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
FieldsWillMerge.find_conflict omits the type parity check implemented by graphql-js. This deviates the GraphQL Ruby implementation from spec compliance. Unfortunately, fixing this issue is a breaking change because existing queries will start getting rejected with a validation error.
This issue has been discussed and some work has been done. Steps to resolution:
{
"errors": [
{
"message": "Fields \"discountValue\" conflict because they return conflicting types \"Decimal!\" and \"Float!\". Use different aliases on the fields to fetch both if this was intentional.",
"locations": [
{
"line": 5,
"column": 7
},
{
"line": 8,
"column": 7
}
]
}
]
}
Actual behavior
This test succeeds without validation error, because the relevant rules are missing from GraphQL Ruby:
Describe the bug
FieldsWillMerge.find_conflict omits the type parity check implemented by
graphql-js
. This deviates the GraphQL Ruby implementation from spec compliance. Unfortunately, fixing this issue is a breaking change because existing queries will start getting rejected with a validation error.This issue has been discussed and some work has been done. Steps to resolution:
fields?
checks should useleaf?
instead.GraphQL schema
GraphQL query
Expected behavior
The following error is logged for this same composition from
graphql-js
. It's triggered by the types check in OverlappingFieldsCanBeMergedRule, which is not implemented in GraphQL Ruby.Actual behavior
This test succeeds without validation error, because the relevant rules are missing from GraphQL Ruby:
The text was updated successfully, but these errors were encountered: