-
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
feat: introduce GraphQLAggregateError #3192
Conversation
81135e1
to
bf57846
Compare
7611c3a
to
f66639a
Compare
f66639a
to
e4f2ace
Compare
e4f2ace
to
d8e3254
Compare
@yaacovCR Thanks a lot for PR 👍
Happy to merge this part of PR + transform of function ExecutionContext validation.
Don't agree with this one. It would be a way better solution if we add We need this functionality anyway since I dislice how we join error messages with graphql-js/src/validation/rules/ValuesOfCorrectTypeRule.ts Lines 146 to 147 in 22b9504
Your idea of returning multiple errors from resolvers gives it a reason to make why an array.I will work on a proposal for the WG (should be a pretty small change to the spec). But if it is rejected I'm ok to merge the solution proposed in this PR (multiple errors for the same path & locations ).
|
graphql#3192 Squashed commit of the following: commit d8e3254 Author: Yaacov Rydzinski <[email protected]> Date: Mon Jun 21 22:54:25 2021 +0300 feat: introduce GraphQLAggregateError commit 25db102 Author: Yaacov Rydzinski <[email protected]> Date: Fri Jun 18 12:10:47 2021 +0300 refactor: introduce handleRawError
This is interesting feedback. Some (numbered!) thoughts:
After thinking about your feedback, I think using a non-exported I am thinking maybe just to rethink the approach ==> more to what you mentioned about an operation context vs. an execution context, except that I think about it as more like a "public" execution context vs the "private" one used internally. The "public" one would include just operation, the fragment map, and the coerced variables, basically what we processed while validating. I might think on that and reapproach this. |
Closing this for now. I think it's fine to improve error handling in GraphQL -- whether with the above suggestions or any type of standardization. But I don't want to get too distracted from the purpose of this PR stack, |
Related #205 |
Motivation: