You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I believe Juniper isn't spec compliant in how it's handling field error propagation.
Relevant excerpt from the GraphQL spec about how to handle field errors on non-nullable fields.
Since Non-Null type fields cannot be null, field errors are propagated to be handled by the parent field. If the parent field may be null then it resolves to null, otherwise if it is a Non-Null type, the field error is further propagated to its parent field.
Juniper follows this behavior when the query doesn't have any fragments, but if the field error only occurs in a fragment, "null" won't propagate to the closest nullable ancestor field, but instead seems to just make the fields in the fragment null, while not affecting fields outside of the fragment.
My interpretation of the GraphQL spec is that the way a query is partitioned into fragments shouldn't affect the query response. I'm not completely sure of this, but I also can't find any mention of how fragments should change the way field errors are handled.
To Reproduce
Unit test demonstrating divergence in behavior
Expected behavior
Expect field errors that occur inside fragments to propagate nullability to their closest nullable ancestor, even if that ancestor is outside of the fragment itself.
equivalently:
Expect above code to not panic.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Describe the bug
I believe Juniper isn't spec compliant in how it's handling field error propagation.
Relevant excerpt from the GraphQL spec about how to handle field errors on non-nullable fields.
Juniper follows this behavior when the query doesn't have any fragments, but if the field error only occurs in a fragment, "null" won't propagate to the closest nullable ancestor field, but instead seems to just make the fields in the fragment null, while not affecting fields outside of the fragment.
My interpretation of the GraphQL spec is that the way a query is partitioned into fragments shouldn't affect the query response. I'm not completely sure of this, but I also can't find any mention of how fragments should change the way field errors are handled.
To Reproduce
Unit test demonstrating divergence in behavior
Expected behavior
Expect field errors that occur inside fragments to propagate nullability to their closest nullable ancestor, even if that ancestor is outside of the fragment itself.
equivalently:
Expect above code to not panic.
Additional context
N/A
The text was updated successfully, but these errors were encountered: