Skip to content

Commit b6be9f9

Browse files
Revert #2639, an attempt to fix query fragment reuse (#2681)
1 parent 8e130db commit b6be9f9

File tree

6 files changed

+93
-876
lines changed

6 files changed

+93
-876
lines changed

.changeset/metal-cheetahs-add.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@apollo/query-planner": patch
3+
"@apollo/federation-internals": patch
4+
"@apollo/gateway": patch
5+
---
6+
7+
Revert #2639 from v2.4.9
8+
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.
10+

gateway-js/src/__tests__/buildQueryPlan.test.ts

+6-13
Original file line numberDiff line numberDiff line change
@@ -744,21 +744,18 @@ describe('buildQueryPlan', () => {
744744

745745
it(`should not get confused by a fragment spread multiple times`, () => {
746746
const operationString = `#graphql
747-
fragment PriceAndCountry on Product {
747+
fragment Price on Product {
748748
price
749-
details {
750-
country
751-
}
752749
}
753750
754751
query {
755752
topProducts {
756753
__typename
757754
... on Book {
758-
...PriceAndCountry
755+
...Price
759756
}
760757
... on Furniture {
761-
...PriceAndCountry
758+
...Price
762759
}
763760
}
764761
}
@@ -773,20 +770,16 @@ describe('buildQueryPlan', () => {
773770
topProducts {
774771
__typename
775772
... on Book {
776-
...PriceAndCountry
773+
...Price
777774
}
778775
... on Furniture {
779-
...PriceAndCountry
776+
...Price
780777
}
781778
}
782779
}
783780
784-
fragment PriceAndCountry on Product {
781+
fragment Price on Product {
785782
price
786-
details {
787-
__typename
788-
country
789-
}
790783
}
791784
},
792785
}

0 commit comments

Comments
 (0)