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

Fix persistedQueries to pull graphqlErrors from networkErrors #9410

Merged

Conversation

redaid113
Copy link
Contributor

This MR fixes an issue with persistedQueries.

Servers can contain graphQLErrors, but was missing in persistedQueries. If a server returned a 400 with a 'PersistedQueryNotFound' error message, it would be treated as a networkError and disable persistedQueries.

Checklist:

  • 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

@apollo-cla
Copy link

@redaid113: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@charle692
Copy link

We're having this same problem as well, would love to see this get merged!

@benjamn benjamn added this to the v3.6.x patch releases milestone May 2, 2022
@benjamn benjamn force-pushed the persisted-query-graphqlError-bug branch from 3135cb2 to aed6e97 Compare May 2, 2022 15:59
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.

Thanks for implementing this improvement and including tests @redaid113!

I made a few additional changes that you are welcome to review at your convenience.

@benjamn benjamn merged commit 66e1750 into apollographql:main May 2, 2022
@redaid113 redaid113 deleted the persisted-query-graphqlError-bug branch May 2, 2022 16:59
@redaid113
Copy link
Contributor Author

Thanks for those changes and reviewing this @benjamn

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants