question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Subscription is stopped after a message with errors is received

See original GitHub issue

Intended 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
RachelScodescommented, Nov 16, 2022

any update on this?

1reaction
hwillsoncommented, Apr 29, 2021

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subscriptions - Apollo GraphQL Docs
Subscriptions are intended to be used to subscribe to external data changes, and have those received changes be stored in the cache.
Read more >
Subscribe with error listener | Cloud Pub/Sub Documentation
Handles errors when subscribing throws an error.
Read more >
How to detect disconnect and reconnect for subscription ...
When you receive onReconnected event, you can simply fetch chat messages that ... for GQL_CONNECTION_ERROR and GQL_CONNECTION_ACK received message types.
Read more >
Subscriptions | urql Documentation
In the following example, we create a subscription that informs us of new messages. We will concatenate the incoming messages so that we...
Read more >
Service Bus messaging exceptions - Azure - Microsoft Learn
The following table lists messaging exception types, ... A receiver has stopped receiving messages from a queue or subscription.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found