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

Test demonstrating a query planner bug (probably) #2680

Closed
wants to merge 1 commit into from

Conversation

glasser
Copy link
Member

@glasser glasser commented Jul 17, 2023

This test passes. However, the "bad" query plan shows something blatantly messed up: a Sequence(Fetch, Flatten) where the Flatten uses a path (graph.variant.graph.accountForPersistedQueriesSubgraph) not mentioned in the Fetch.

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2023

⚠️ No Changeset found

Latest commit: cf17230

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Jul 17, 2023

Deploy Preview for apollo-federation-docs canceled.

Name Link
🔨 Latest commit cf17230
🔍 Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/64b5894c0d8b7a00082dbcde

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 17, 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.

This test passes. However, the "bad" query plan shows something
blatantly messed up: a Sequence(Fetch, Flatten) where the Flatten uses a
path (graph.variant.graph.accountForPersistedQueriesSubgraph) not
mentioned in the Fetch.
@glasser glasser force-pushed the glasser/bad-subgraph-query-plan branch from a8d5d5a to cf17230 Compare July 17, 2023 18:32
trevor-scheer added a commit that referenced this pull request Jul 19, 2023
This commit reapplies #2639 with an additional fix related to
reproducing and resolving #2680.

The bug existed in the SelectionSet.contains logic in the final
check to provide a ContainsResult. Here the lengths of the
compared selection sets are used to determine subset or
strictly equal. In the case that the __typename field was
ignored up above, the comparison becomes invalid unless we
offset the comparison by 1 to account for the non-existent field.
trevor-scheer added a commit that referenced this pull request Jul 19, 2023
This commit reapplies #2639 with an additional fix related to
reproducing and resolving #2680.

The bug existed in the SelectionSet.contains logic in the final
check to provide a ContainsResult. Here the lengths of the
compared selection sets are used to determine subset or
strictly equal. In the case that the __typename field was
ignored up above, the comparison becomes invalid unless we
offset the comparison by 1 to account for the non-existent field.
trevor-scheer added a commit that referenced this pull request Jul 19, 2023
This commit reapplies #2639 with an additional fix related to
reproducing and resolving #2680.

The bug existed in the SelectionSet.contains logic in the final
check to provide a ContainsResult. Here the lengths of the
compared selection sets are used to determine subset or
strictly equal. In the case that the __typename field was
ignored up above, the comparison becomes invalid unless we
offset the comparison by 1 to account for the non-existent field.
@trevor-scheer
Copy link
Member

Resolved via #2684 and #2687. Thanks for the repro!

@trevor-scheer trevor-scheer deleted the glasser/bad-subgraph-query-plan branch July 21, 2023 01:08
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.

2 participants