Based on this topic: Is it possible to cancel Graphql subscriptions?.
I was using
useSubscription, but when I came across the topic above, I changed it to the
client.subscribe() implementation to manually unsubscribe.
However, after unsubscribing using
subscription.unsubscribe();, I noticed that the web socket is still opened and still listening to events. So my question is, how do I disconnect the observer?
I am guessing it should look something like this: