-
Notifications
You must be signed in to change notification settings - Fork 493
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
[Bug] GraphQL server returns interface type for __typename when UseFieldResolvers is enabled #630
Comments
@magicoder10 thank you for reporting this. Can I, please, have the code for the resolver as well? |
Initially this library was developed without field resolvers. There had to be a corresponding method for each GraphQL field. Therefore it made sense to represent GraphQL interfaces by corresponding Go interfaces which have a method for each of the GraphQL interface fields. If we choose to use field resolvers in our schema we would need to still use methods for the GraphQL interface fields. Here is a working example:
I understand that this might be confusing and maybe this needs to be either better documented or the library needs to be changed in a way to allow field resolution of GraphQL interface fields 🤔 |
Input
Schema
Query
Output
Without UseFieldResolvers
With UseFieldResolvers
This bug leads to
The text was updated successfully, but these errors were encountered: