-
Notifications
You must be signed in to change notification settings - Fork 2k
Custom global fieldResolver called on introspection fields #1015
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
Comments
I ran into the same issue, when launching the graphiql console. |
@growak I ended up copying the default resolver behavior into my custom resolver and checking the type via the |
@southpolesteve thx |
@southpolesteve can you share your solution? can we close this? |
@southpolesteve @fredericnowak @sibelius It shouldn't work like that since field specific resolvers always take precedence over schema wide graphql-js/src/execution/execute.js Line 693 in ae5b163
and all introspection types have assigned resolvers. How did you construct your schema? Such behavior can occur if you construct your schema using |
Sorry I no longer have access to the code where I solved this problem :/ |
I did some testing and you were right. There are a few introspection fields that don't have resolver attached. So I created #1329 PR which should fix this issue. |
Ran into this when adding a custom schema wide
fieldResolver
. This resolver will also get called for introspection fields which was surprising to me. Is this the expected behavior?The text was updated successfully, but these errors were encountered: