Hi guys. I am currently working on my project where im having problem with websocket.
When user change profile in the settings, I am cancelling active subscriptions on Cancellable value that holds that subscription(as documentation says Subscriptions - Apollo GraphQL Docs), and in the meantime I am making that same subscriptions, but with the different ID. Configuration is done according to documentation, using SplitNetworkTransport. In most cases, when you trigger cancelling and creating new subscriptions, apollo is trying to connect websocket, but it ends up in the loop: websocket is disconnected ( most of the time without error message, sometimes with "Invalid message received", code: 4400).
When Im not cancelling subscriptions(Cancellable.cancel()), everything works fine.
Project is using graphql-transport-ws protocol.
Any help would be awesome, because im stuck on this problem for a very long time.