Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adds tests for WebSockets error cases and handles Event sent on error #10586

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

alessbell
Copy link
Contributor

@alessbell alessbell commented Feb 20, 2023

Closes #10394.

Adds tests and prevents undefined error message after a websocket connection is closed when network connection is lost.

Checklist:

  • If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see CONTRIBUTING.md)
  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2023

🦋 Changeset detected

Latest commit: 63f00c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

src/errors/index.ts Outdated Show resolved Hide resolved
@lovasoa
Copy link
Contributor

lovasoa commented Mar 22, 2023

Is there something I can do to help here ?

I would really like this pr (or even better, #10411 ) to be merged 🙂

@alessbell alessbell mentioned this pull request Mar 28, 2023
3 tasks
@alessbell alessbell force-pushed the issue-10394-websocket-errors branch from 42fb2d6 to 7b13cde Compare March 29, 2023 14:58
@netlify
Copy link

netlify bot commented Mar 29, 2023

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit c05cdd9
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/642700f3f735a30008f6d2ce
😎 Deploy Preview https://deploy-preview-10586--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

src/errors/index.ts Outdated Show resolved Hide resolved
@alessbell alessbell requested a review from benjamn March 29, 2023 16:25
@alessbell alessbell force-pushed the issue-10394-websocket-errors branch from afc1826 to bc5c766 Compare March 30, 2023 13:40
@alessbell alessbell changed the title Chore: adds tests for WebSockets error cases and prevents undefined message chore: adds tests for WebSockets error cases and handles Event sent on error Mar 31, 2023
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @alessbell!

src/link/subscriptions/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎉 🎉 Thanks so much for fixing this!

@alessbell alessbell merged commit 4175af5 into main Mar 31, 2023
@alessbell alessbell deleted the issue-10394-websocket-errors branch March 31, 2023 17:32
@github-actions github-actions bot mentioned this pull request Mar 31, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQLWsLink throws ApolloError("undefined") on websocket errors
4 participants