-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add error code to parse/validate errors passed to 'didEncounterErrors' #6572
Add error code to parse/validate errors passed to 'didEncounterErrors' #6572
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2b1851d:
|
c035c5a
to
2409356
Compare
2409356
to
31c478d
Compare
✅ Deploy Preview for apollo-server-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I like the nested error approach.
One thought -- would be good to have an end to end tests that shows how the errors are rendered. In ApolloServer.test.ts there's the test "parse errors" -- change it to do an inline snapshot on all of result, and add another test next to it for a validation error, perhaps?
(possibly as a follow-up) Worth thinking about if it's easy and a good idea to do something like #4351 (comment) ? |
(though let's get this merged first before thinking of my last comment @IvanGoncharov ) |
Implement fix proposed in apollographql#6558 but implement it on top of AS4 Also contain some cleanup and refactoring related to apollographql#6355
31c478d
to
2b1851d
Compare
|
@glasser I addressed you comment about adding more tests. |
Implement the fix proposed in #6558 but implement it on top of AS4
Also, contain some cleanup and refactoring related to #6355