-
Notifications
You must be signed in to change notification settings - Fork 257
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 QP bug querying some fields with @interfaceObject
#2362
Conversation
👷 Deploy request for apollo-federation-docs pending review.Visit the deploys page to approve it
|
🦋 Changeset detectedLatest commit: 914ded6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
066bb0f
to
80d72b9
Compare
Just one misspelling in the changelog. Other than that, it looks like we need to update the graphql type check thingy (is there an actual reason for having this be a part of our pipeline?) but I'll approve assuming you'll do that. |
When an interface field is requested only for some implementation, and the query "transit" through a subgraph using `@interfaceObject`, then the query planning code was not recognizing early enough that the field was queried on an implementation type and not the interface itself, and this lead to a later assertion error. This commit adds a reproduction test, and fix the issue by simply making sure, when we build the query plan "paths", to not use an interface field when it's an implementation field that is queried.
96ecf14
to
914ded6
Compare
When an interface field is requested only for some implementation, and the query "transit" through a subgraph using
@interfaceObject
, then the query planning code was not recognizing early enough that the field was queried on an implementation type and not the interface itself, and this lead to a later assertion error.This commit adds a reproduction test, and fix the issue by simply making sure, when we build the query plan "paths", to not use an interface field when it's an implementation field that is queried.