Skip to content

Revert #2639, an attempt to fix query fragment reuse #2681

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

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/metal-cheetahs-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@apollo/query-planner": patch
"@apollo/federation-internals": patch
"@apollo/gateway": patch
---

Revert #2639 from v2.4.9

PR #2639 attempts to resolve issues with query fragment reuse, but we've since turned up multiple issues (at least 1 of which is a regression - see #2680. For now, this reverts it until we resolve the regression for a future patch release.

19 changes: 6 additions & 13 deletions gateway-js/src/__tests__/buildQueryPlan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,21 +744,18 @@ describe('buildQueryPlan', () => {

it(`should not get confused by a fragment spread multiple times`, () => {
const operationString = `#graphql
fragment PriceAndCountry on Product {
fragment Price on Product {
price
details {
country
}
}

query {
topProducts {
__typename
... on Book {
...PriceAndCountry
...Price
}
... on Furniture {
...PriceAndCountry
...Price
}
}
}
Expand All @@ -773,20 +770,16 @@ describe('buildQueryPlan', () => {
topProducts {
__typename
... on Book {
...PriceAndCountry
...Price
}
... on Furniture {
...PriceAndCountry
...Price
}
}
}

fragment PriceAndCountry on Product {
fragment Price on Product {
price
details {
__typename
country
}
}
},
}
Expand Down
Loading