There is a way to check union resolver's type conflict between Types on mergeTypeDefs #4169
Unanswered
mehdibeldjilali
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I would like to know if it's possible to throw an error or have a warning on server side (when I call mergeTypeDefs) if union elements share the same resolver name but not the same type.
GraphQL Specification : http://spec.graphql.org/October2021/#SameResponseShape()
The
mergeTypeDefs
function doesn't throw an error even ifignoreFieldConflicts
option orthrowOnConflict
option are set totrue
but in front you have an error like that :Error: GraphQL error: Fields \"test\" conflict because they return conflicting types String and String!. Use different aliases on the fields to fetch both if this was intentional
Schema example :
I missing something, or it's not available on server side ?
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions