Skip to content
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

handle null interface items #1499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xuorig
Copy link

@xuorig xuorig commented Mar 19, 2024

It's not currently possible to return null for a field returning an interface type in dynamic schemas. It fails since resolution expects a WithType.

This PR fixes this, but I haven't added tests / looks at whether this handles all cases correctly. Wanted your thoughts first. If that seems like the right fix, I'm happy to clean this PR up / add tests.

@xuorig xuorig changed the title handle null interface items gracefully handle null interface items Mar 19, 2024
@sunli829
Copy link
Collaborator

Only optional types can be nil, but interface cannot, so I think this change is incorrect and will result in a response that does not conform to the GraphQL specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants