-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fix introspection query failing with "Cannot return null for non-nullable field" #81
base: main
Are you sure you want to change the base?
Conversation
c7d2e69
to
1323232
Compare
LGTM! @kzlsakal you want to take a look and merge if it looks good to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @dhrdlicka!
I tested this on a local subgraph, and introspection on both the GraphiQL Playground and the Apollo Explorer are producing the following error, although the network call returns a successful response:
instrument.js:105 Error: Invalid or incomplete schema, unknown type: _FieldSet. Ensure that a full introspection query is used in order to build a client schema.
Do we need to omit certain records that refer to this _FieldSet
? Not sure if this change is causing redundant types to be added to the schema or if they were already there, but it seems like we still cannot produce a successful introspection the way it is.
@kzlsakal I guess I should have checked the actual query result before coming to premature conclusions 😄 Yeah, the introspection query doesn't crash anymore but the types defined in the schema prototype are still not there. I think they might be getting stripped when they're not actually used in the schema itself. |
I opened an issue in the Absinthe repository for this problem: absinthe-graphql/absinthe#1279 |
any update on this? |
The introspection query is currently failing due to argument types for the
@link
directive not resolving properly, as they don't seem to get actually imported fromAbsinthe.Federation.Schema.Prototype
.This PR adds a
import_type
statement to fix that.