Skip to content

Commit 1a09079

Browse files
committed
Update snapshots for graphql@15's preservation of user-type sortation.
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
1 parent 3b36588 commit 1a09079

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

packages/apollo-gateway/src/__tests__/buildQueryPlan.test.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,10 @@ describe('buildQueryPlan', () => {
709709
{
710710
topProducts {
711711
__typename
712-
... on Book {
712+
... on Furniture {
713713
price
714714
}
715-
... on Furniture {
715+
... on Book {
716716
price
717717
}
718718
}
@@ -747,38 +747,38 @@ describe('buildQueryPlan', () => {
747747
{
748748
topProducts {
749749
__typename
750-
... on Book {
750+
... on Furniture {
751751
price
752752
__typename
753-
isbn
753+
upc
754754
}
755-
... on Furniture {
755+
... on Book {
756756
price
757757
__typename
758-
upc
758+
isbn
759759
}
760760
}
761761
}
762762
},
763763
Flatten(path: "topProducts.@") {
764764
Fetch(service: "reviews") {
765765
{
766-
... on Book {
767-
__typename
768-
isbn
769-
}
770766
... on Furniture {
771767
__typename
772768
upc
773769
}
770+
... on Book {
771+
__typename
772+
isbn
773+
}
774774
} =>
775775
{
776-
... on Book {
776+
... on Furniture {
777777
reviews {
778778
body
779779
}
780780
}
781-
... on Furniture {
781+
... on Book {
782782
reviews {
783783
body
784784
}
@@ -856,25 +856,25 @@ describe('buildQueryPlan', () => {
856856
const queryPlan = buildQueryPlan(buildOperationContext(schema, query));
857857

858858
expect(queryPlan).toMatchInlineSnapshot(`
859-
QueryPlan {
860-
Fetch(service: "product") {
861-
{
862-
product(upc: "") {
863-
__typename
864-
... on Book {
865-
details {
866-
country
859+
QueryPlan {
860+
Fetch(service: "product") {
861+
{
862+
product(upc: "") {
863+
__typename
864+
... on Furniture {
865+
details {
866+
country
867+
}
867868
}
868-
}
869-
... on Furniture {
870-
details {
871-
country
869+
... on Book {
870+
details {
871+
country
872+
}
872873
}
873874
}
874875
}
875-
}
876-
},
877-
}
876+
},
877+
}
878878
`);
879879
});
880880
});

0 commit comments

Comments
 (0)