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

Introduce test for interface fragment on object type #261

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

Conversation

Kingdutch
Copy link
Contributor

If interface A is implemented by object B then a fragment F on A should be
spreadable on a field returning object B. This is described in the spec
under section
5.5.2.3.1
.

This test shows that this fails if a field from the fragment is also selected
in the top level selection. This is a valid use-case when a component lower
in the tree requires the data and the component making the query does too.

If interface A is implemented by object B then a fragment F on A should be
spreadable on a field returning object B. This is described in the spec
under [section
5.5.2.3.1](https://spec.graphql.org/June2018/#sec-Abstract-Spreads-in-Object-Scope).
@jfrolich
Copy link
Collaborator

jfrolich commented Jul 2, 2021

Thanks! I think I made it too type-safe so this case raises an error. I'll look into how this can be addressed.

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