Closed bauwaerter closed 3 years ago
Subscription unsubscribes when it gets a graphQL error and it never resubscribes.
Packages:
"dependencies": { "@apollo/client": "^3.3.14", "apollo-link-timeout": "^3.0.0", "graphql": "^15.5.0", "react": "^16.14.0", "react-dom": "^16.14.0", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "subscriptions-transport-ws": "^0.9.18", },
Intended Outcome:
The subscription should stay subscribed when it gets graphQL errors.
Actual Outcome:
Steps to reproduce:
export const subscriptionLink = new WebSocketLink({ uri: `${wsScheme}://${graphQLHost}/graphql`, options: { reconnect: true, lazy: true, }, })
export const TestComponent: React.FC = () => { const { data, error, loading } = useSubscription(TestDocument, { shouldResubscribe: true }) return <div /> }
Setup your subscription and throw a graphQL error from the server.
I'm not sure if this is the intended behavior, but I don't see a way I can resubscribe. Once the stop command is sent it kills that subscription and it never starts back up again.
After further investigation this issue looks like it has something to do with how apollo client is dealing with subscription errors.
Subscription unsubscribes when it gets a graphQL error and it never resubscribes.
Packages:
Intended Outcome:
The subscription should stay subscribed when it gets graphQL errors.
Actual Outcome:
Steps to reproduce:
Setup your subscription and throw a graphQL error from the server.
I'm not sure if this is the intended behavior, but I don't see a way I can resubscribe. Once the stop command is sent it kills that subscription and it never starts back up again.