-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
What if there's a "field error" during serial execution? #277
Comments
I think not executing |
On the other hand, if #252 (nested serial fields) was introduced, you could specify dependencies via:
Actually; the above might already be spec compliant. HMMM!!! |
I also always had an assumption that I would agree with @stubailo on this one. It is quite valuable property to have. If you would like to give user a choice, you can provide two mutation field variations: nullable and not-null. |
Thanks for shedding some light on this one! I've merged that behavior into GraphQL Ruby. Do you think it should be clarified in the spec, or is the spec sufficient already? |
yes, I think it needs to be explicitly stated un the spec. From what I can tell, It's not clear how execution should behave in this situation. Even if this behavior can be inferred from other parts of the spec, I think it would be beneficial if this aspect is explicitly described. |
This is the most important question, since the result is what's observable to the request, and this is absolutely correct.
This has been intentionally ambiguous since the requestor cannot observe the results, however I think it's totally acceptable to not execute it in the face of errors. I've added some additional text in #438 which specifically points out that execution of sibling fields may be cancelled in the case that an error occurs on a non-null field. |
Let's say you have a mutation type like:
And you send a query like:
And, given the unluckiness of 13,
push(val: 13)
causes an internal error, resulting a null value for that field. What should happen? Specifically:{ data: null, errors: [ /* 1 error */] }
? (Judging by "Errors and Non-Nullability", yes.)push(val: 2)
be executed? (I can't quite figure it out from "Normal and Serial Execution".)The text was updated successfully, but these errors were encountered: