You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using subscribeToMore, if one of the resolvers throws an error on the server, the client receives a GraphQL error which initiates a subscription shutdown. I tried adding an onError callback but the Observerable.notifySubscription just unconditionally closes the subscription when an error is received.
I have the reconnect: true option set on the WebSocketLink but the problem is that the subscription ends even though the websocket link is still alive.
Would the best workaround be to not use the subscribeToMore option on the query definition and instead have a method that calls the subscribeToMore and onError re-call that method to re-establish the subscription?
To Reproduce
Steps to reproduce the behavior:
Define a smart query with a subscribeToMore
Publish a message on the server
Throw an error from a resolver on the server
You'll see that the server receives a stop message in the websocket frames
Publish another message on the server
Since the stop message was sent, the new publish is never processed
Expected behavior
I would expect the subscription to either re-connect or stay alive when an exception occurs.
Describe the bug
When using subscribeToMore, if one of the resolvers throws an error on the server, the client receives a GraphQL error which initiates a subscription shutdown. I tried adding an onError callback but the Observerable.notifySubscription just unconditionally closes the subscription when an error is received.
I have the reconnect: true option set on the WebSocketLink but the problem is that the subscription ends even though the websocket link is still alive.
Would the best workaround be to not use the subscribeToMore option on the query definition and instead have a method that calls the subscribeToMore and onError re-call that method to re-establish the subscription?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the subscription to either re-connect or stay alive when an exception occurs.
Versions
vue: 2.6.10
vue-apollo: 3.0.0
apollo-client: 2.6.4
Additional context
The text was updated successfully, but these errors were encountered: