Subscription is stopped after a message with errors is received
See original GitHub issueIntended outcome:
If one message from a subscription comes with errors from the server (for example if a non-nullable field was resolved to null
) the subscription should stay subscribed for getting future messages.
Actual outcome:
The subscription is immediately stopped, I can see the stop
message being sent over the ws
connection. Is this intended behaviour? Is it somehow configurable?
How to reproduce the issue: Open a subscription and send a GraphQL error from the server.
Versions System: OS: macOS 10.15.3 Binaries: Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node Yarn: 1.21.1 - ~/.yarn/bin/yarn npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm Browsers: Chrome: 80.0.3987.132 Firefox: 72.0.2 Safari: 13.0.5 npmPackages: @apollo/react-hooks: ^3.1.3 => 3.1.3 apollo-cache-inmemory: ^1.4.3 => 1.6.3 apollo-client: 2.6.8 => 2.6.8 apollo-link: ^1.2.11 => 1.2.13 apollo-link-context: ^1.0.14 => 1.0.19 apollo-link-error: ^1.1.1 => 1.1.12 apollo-link-http: ^1.5.14 => 1.5.16 apollo-link-state: ^0.4.2 => 0.4.2 apollo-link-ws: ^1.0.19 => 1.0.19 apollo-utilities: ^1.1.3 => 1.3.3 react-apollo: 2.5.8 => 2.5.8 reason-apollo: 0.18.0 => 0.18.0 reason-apollo-hooks: https://github.com/Astrocoders/reason-apollo-hooks => 6.0.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top GitHub Comments
any update on this?
A lot of the Apollo Client internals have changed since v3 was launched. We recommend trying a more modern version of
@apollo/client
. Let us know if you’re still encountering this issue. Thanks!