Skip to content

Commit

Permalink
Revert "Reuse named fragment in subgraphs even if they only apply par…
Browse files Browse the repository at this point in the history
…tially (#2639)"

This reverts commit d60349b.
  • Loading branch information
trevor-scheer committed Jul 17, 2023
1 parent 99f2f8a commit 6083bea
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 876 deletions.
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

0 comments on commit 6083bea

Please sign in to comment.