-
Notifications
You must be signed in to change notification settings - Fork 574
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(sofa): respect error extensions in case of 404 #3559
Conversation
🦋 Changeset detectedLatest commit: da02de1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Apollo Federation Subgraph Compatibility Results
Learn more: |
💻 Website PreviewThe latest changes are available as preview in: https://828372f7.graphql-yoga.pages.dev |
✅ Benchmark Results
|
81d1ce5
to
5665167
Compare
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.
Do we have a documentation on how SOFA handles errors?
@Urigo Good point! |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
5665167
to
475ce76
Compare
can you also link to the SOFA docs from the Yoga docs? |
also, I see a lot of user comments on this page on discuss: Can you please review all these questions and make sure there are good answers for them, including in the docs? |
I did and updated PR based on the feedback. Let me know if it is good enough. |
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.
great work!
Fix the issue when SOFA returns 404 response from error extensions returned by a resolver, it will cause the server to continue the request handling with Yoga but instead it should return the response with 404 and the body SOFA returns.
That line was causing a 404 response to continue with Yoga's handler;
https://github.com/dotansimha/graphql-yoga/pull/3559/files#diff-ede815ebc73ee3925e49864ba3ac573940f77e8542cf395ccbf405b284c006aeL120
As in this test case;