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
It appears that objects returned by an inline fragment override the "less specific" part of a query (forgive my limited knowledge of GraphQL terms). I would expect a single, merged object to be returned.
I can't immediately find anything in the GraphQL spec that covers how this should be handled, but the fact that the below query returns my expected (merged) object makes me think this might be a bug in gqlgen's handling of inline fragments:
What happened?
It appears that objects returned by an inline fragment override the "less specific" part of a query (forgive my limited knowledge of GraphQL terms). I would expect a single, merged object to be returned.
What did you expect?
I expect to be able to make this query:
And get this result:
Instead the inline fragment appears to supercede the previous part of the query and I get only the UID:
I can't immediately find anything in the GraphQL spec that covers how this should be handled, but the fact that the below query returns my expected (merged) object makes me think this might be a bug in gqlgen's handling of inline fragments:
Minimal graphql.schema and models to reproduce
See:
versions
gqlgen version
? 5ad012ego version
?go version go1.16.4 linux/amd64
The text was updated successfully, but these errors were encountered: