-
-
Notifications
You must be signed in to change notification settings - Fork 606
Update errors.md #3816
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
Update errors.md #3816
Conversation
Added partial error response details in error guides
Reviewer's Guide by SourceryThis pull request enhances the 'Dealing with Errors' documentation by adding a section about partial error responses. It explains how GraphQL handles resolver failures by returning partial data when fields are defined as optional, and provides an example to illustrate this behavior. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
for more information, see https://pre-commit.ci
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.
Hey @sabrahul - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a note about how to configure Strawberry to always return partial responses, even for non-optional fields.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
patrick91
left a comment
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.
This is perfect! Thank you!
|
@sabrahul can you add "failed" here? https://github.com/strawberry-graphql/strawberry/blob/main/.alexrc#L16 |
add failed in .alexrc
Update .alexrc
|
Hi @patrick91, I have added what you've asked. Is there something else we need to do? |
|
@sabrahul no, all good! thanks! |
|
Thanks for contributing to Strawberry! 🎉 You've been invited to join You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67 And don't forget to join our discord server: https://strawberry.rocks/discord 🔥 |
* Update errors.md Added partial error response details in error guides * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update .alexrc add failed in .alexrc --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Added partial error response details in error guides
Description
This PR enhances the Dealing with Errors documentation by adding details about partial error responses. It addresses an issue where a single resolver failure causes the entire GraphQL response to be null instead of returning partial data. The update explains the expected behavior and highlights the importance of using Optional types in field resolvers to ensure partial responses are correctly handled.
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Document how Strawberry handles partial responses when a resolver fails, and explain how to use Optional types to ensure partial responses are correctly handled.
Enhancements: