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 Feb 17, 2020
1 parent 3b36588 commit 1a09079
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions packages/apollo-gateway/src/__tests__/buildQueryPlan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,10 @@ describe('buildQueryPlan', () => {
{
topProducts {
__typename
... on Book {
... on Furniture {
price
}
... on Furniture {
... on Book {
price
}
}
Expand Down Expand Up @@ -747,38 +747,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 @@ -856,25 +856,25 @@ describe('buildQueryPlan', () => {
const queryPlan = buildQueryPlan(buildOperationContext(schema, query));

expect(queryPlan).toMatchInlineSnapshot(`
QueryPlan {
Fetch(service: "product") {
{
product(upc: "") {
__typename
... on Book {
details {
country
QueryPlan {
Fetch(service: "product") {
{
product(upc: "") {
__typename
... on Furniture {
details {
country
}
}
}
... on Furniture {
details {
country
... on Book {
details {
country
}
}
}
}
}
},
}
},
}
`);
});
});

0 comments on commit 1a09079

Please sign in to comment.