Skip to content

Commit

Permalink
Update snapshots for graphql@15's preservation of user-type sortation.
Browse files Browse the repository at this point in the history
The order of types returned by, e.g. `getImplementation`, will now be
dependent on the order that those types first appear in the schema.

See the referenced issues, the first of which implemented the change and the
second which indicates the motivation.

Ref: graphql/graphql-js#2410
Ref: graphql/graphql-js#2362
  • Loading branch information
abernix committed May 5, 2020
1 parent 187428b commit 83bea13
Showing 1 changed file with 80 additions and 80 deletions.
160 changes: 80 additions & 80 deletions packages/apollo-gateway/src/__tests__/buildQueryPlan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,10 +756,10 @@ describe('buildQueryPlan', () => {
{
topProducts {
__typename
... on Book {
... on Furniture {
price
}
... on Furniture {
... on Book {
price
}
}
Expand Down Expand Up @@ -794,38 +794,38 @@ describe('buildQueryPlan', () => {
{
topProducts {
__typename
... on Book {
... on Furniture {
price
__typename
isbn
upc
}
... on Furniture {
... on Book {
price
__typename
upc
isbn
}
}
}
},
Flatten(path: "topProducts.@") {
Fetch(service: "reviews") {
{
... on Book {
__typename
isbn
}
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
} =>
{
... on Book {
... on Furniture {
reviews {
body
}
}
... on Furniture {
... on Book {
reviews {
body
}
Expand Down Expand Up @@ -908,12 +908,12 @@ describe('buildQueryPlan', () => {
{
product(upc: "") {
__typename
... on Book {
... on Furniture {
details {
country
}
}
... on Furniture {
... on Book {
details {
country
}
Expand Down Expand Up @@ -966,17 +966,46 @@ describe('buildQueryPlan', () => {
}
fragment __QueryPlanFragment_0__ on Product {
__typename
... on Book {
__typename
isbn
}
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
}
},
Parallel {
Flatten(path: "[email protected]") {
Fetch(service: "product") {
{
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
} =>
{
... on Furniture {
name
price
details {
country
}
}
... on Book {
price
details {
country
}
}
}
},
},
Sequence {
Flatten(path: "[email protected]") {
Fetch(service: "books") {
Expand Down Expand Up @@ -1014,35 +1043,6 @@ describe('buildQueryPlan', () => {
},
},
},
Flatten(path: "[email protected]") {
Fetch(service: "product") {
{
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
} =>
{
... on Furniture {
name
price
details {
country
}
}
... on Book {
price
details {
country
}
}
}
},
},
},
},
}
Expand Down Expand Up @@ -1152,17 +1152,46 @@ describe('buildQueryPlan', () => {
}
fragment __QueryPlanFragment_0__ on Product {
__typename
... on Book {
__typename
isbn
}
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
}
},
Parallel {
Flatten(path: "[email protected]") {
Fetch(service: "product") {
{
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
} =>
{
... on Furniture {
name
cost: price
details {
origin: country
}
}
... on Book {
cost: price
details {
origin: country
}
}
}
},
},
Sequence {
Flatten(path: "[email protected]") {
Fetch(service: "books") {
Expand Down Expand Up @@ -1200,35 +1229,6 @@ describe('buildQueryPlan', () => {
},
},
},
Flatten(path: "[email protected]") {
Fetch(service: "product") {
{
... on Furniture {
__typename
upc
}
... on Book {
__typename
isbn
}
} =>
{
... on Furniture {
name
cost: price
details {
origin: country
}
}
... on Book {
cost: price
details {
origin: country
}
}
}
},
},
},
},
}
Expand Down

0 comments on commit 83bea13

Please sign in to comment.