Skip to content

Commit

Permalink
Revert "Revert #2639, an attempt to fix query fragment reuse (#2681)"
Browse files Browse the repository at this point in the history
This reverts commit b6be9f9.
  • Loading branch information
trevor-scheer committed Jul 18, 2023
1 parent 0519eec commit f41936f
Show file tree
Hide file tree
Showing 5 changed files with 876 additions and 83 deletions.
19 changes: 13 additions & 6 deletions gateway-js/src/__tests__/buildQueryPlan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,18 +744,21 @@ describe('buildQueryPlan', () => {

it(`should not get confused by a fragment spread multiple times`, () => {
const operationString = `#graphql
fragment Price on Product {
fragment PriceAndCountry on Product {
price
details {
country
}
}
query {
topProducts {
__typename
... on Book {
...Price
...PriceAndCountry
}
... on Furniture {
...Price
...PriceAndCountry
}
}
}
Expand All @@ -770,16 +773,20 @@ describe('buildQueryPlan', () => {
topProducts {
__typename
... on Book {
...Price
...PriceAndCountry
}
... on Furniture {
...Price
...PriceAndCountry
}
}
}
fragment Price on Product {
fragment PriceAndCountry on Product {
price
details {
__typename
country
}
}
},
}
Expand Down

0 comments on commit f41936f

Please sign in to comment.