Skip to content

Commit

Permalink
Revert #2639, an attempt to fix query fragment reuse (#2681)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer authored Jul 17, 2023
1 parent 8e130db commit b6be9f9
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 876 deletions.
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

0 comments on commit b6be9f9

Please sign in to comment.