-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 issue where selection set flattening uses the wrong parent type #8664
Fix issue where selection set flattening uses the wrong parent type #8664
Conversation
🦋 Changeset detectedLatest commit: 96819f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
That's awesome! Thanks for figuring out a way to replicate it in a test @jdmoody |
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.
Awesome, thank you ❤️
Can you please also generate a changeset? See #8664 (comment)
Updated! Thanks for all your work on such an excellent OS library. |
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.
great work!
Description
Related #7364 and #6874
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
Here's a screenshot of how the test fails without the bugfix:
How Has This Been Tested?
Checklist:
Further comments
This is just #6874 with a unit test to show what has been fixed 😅 @mvestergaard did all the hard work here
The important features of the schema and query used in the test are:
snake
field returns aSnakeResult
and all the child fields are within a... on Snake
inline fragment with a type condition. (I tried having thesnake
field return a typeSnake
, instead, but this did not cause a bug)Bat
andSnake
subtypes ofAnimal
both have a field namedfeatures
, but they are of a different type.There might be other test cases that cause the same error because what @cecchi described in #7364 seems to be slightly different than the issue I was able to repro.