closeConnection
Closes the websocket connection if the transport is a WebSocketNetworkTransport.
exception is passed down to ApolloResponse.exception so you can decide how to handle the exception for active subscriptions.
apolloClient.subscriptionNetworkTransport.closeConnection(DefaultApolloException("oh no!"))
Content copied to clipboard
See also
Throws
if transport is not a WebSocketNetworkTransport
Closes the websocket connection if the transport is a WebSocketNetworkTransport.
A response is emitted with ApolloResponse.exception set to ApolloWebSocketForceCloseException.