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

Correctly remove useless groups which "downgrade" __typename values #2778

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

trevor-scheer
Copy link
Member

@trevor-scheer trevor-scheer commented Sep 12, 2023

In certain cases, the query planner was preserving some fetches which were "useless" that would rewrite __typename from its already-resolved concrete type back to its interface type. This could result in (at least) requested fields being "filtered" from the final result due to the interface's __typename in the data where the concrete type's __typename was expected.

Specifically, the solution was compute the path between newly created groups and their parents when we know that it's trivial ([]). Further along in the planning process, this allows to actually remove the known-useless group.

Fixes #2743 (pt 2)

@trevor-scheer trevor-scheer requested a review from a team as a code owner September 12, 2023 21:57
@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2023

🦋 Changeset detected

Latest commit: 08ff48b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@apollo/query-planner Patch
@apollo/gateway Patch
@apollo/federation-internals Patch
@apollo/composition Patch
@apollo/query-graphs Patch
@apollo/subgraph Patch
apollo-federation-integration-testsuite Patch

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

@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.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 12, 2023

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.

Base automatically changed from trevor/fix-2743 to main September 14, 2023 22:42
trevor-scheer and others added 2 commits September 14, 2023 15:45
Co-authored-by: Sylvain Lebresne <lebresne@gmail.com>
@netlify
Copy link

netlify bot commented Sep 14, 2023

Deploy Preview for apollo-federation-docs canceled.

Name Link
🔨 Latest commit 08ff48b
🔍 Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/65038d176041ee000828e5a2

@trevor-scheer trevor-scheer merged commit a37bbbf into main Sep 15, 2023
15 checks passed
@trevor-scheer trevor-scheer deleted the trevor/fix-2743-pt-2 branch September 15, 2023 15:16
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.

query execution error when using @interfaceObject
2 participants