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

Fix issues with use of type condition in a @require (fed1 version) #1874

Open
wants to merge 2 commits into
base: version-0.x
Choose a base branch
from

Conversation

pcmanus
Copy link
Contributor

@pcmanus pcmanus commented May 20, 2022

No description provided.

Sylvain Lebresne added 2 commits May 20, 2022 16:07
When a `@require` add nested selections, the `__typename` of the nested
object was not queried in the query plans. If that `@require` selection
also some conditional selection (fragments with type condition), then
the lack of `__typename` meant that the execution code was not able
to correctly identify the proper data to send to subgraphs (it couldn't
say the type of the data fetched, and so when computed what should be
included for the `@require`, those conditional selection couldn't be
evaluated properly).

This commit fixes the issue by ensure we always query `__typename` for
nested objects within `@require`.

Fixes apollographql#1867.
…uire

This is the fed1 version of the fed2 patch at
apollographql#1873. Seen that
PR/commit for more details.
@netlify
Copy link

netlify bot commented May 20, 2022

👷 Deploy request for apollo-federation-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d1aa5d2

@pcmanus pcmanus self-assigned this May 20, 2022
@codesandbox-ci
Copy link

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.

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.

1 participant