Skip to content

Commit 83bea13

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 187428b commit 83bea13

File tree

1 file changed

+80
-80
lines changed

1 file changed

+80
-80
lines changed

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

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -756,10 +756,10 @@ describe('buildQueryPlan', () => {
756756
{
757757
topProducts {
758758
__typename
759-
... on Book {
759+
... on Furniture {
760760
price
761761
}
762-
... on Furniture {
762+
... on Book {
763763
price
764764
}
765765
}
@@ -794,38 +794,38 @@ describe('buildQueryPlan', () => {
794794
{
795795
topProducts {
796796
__typename
797-
... on Book {
797+
... on Furniture {
798798
price
799799
__typename
800-
isbn
800+
upc
801801
}
802-
... on Furniture {
802+
... on Book {
803803
price
804804
__typename
805-
upc
805+
isbn
806806
}
807807
}
808808
}
809809
},
810810
Flatten(path: "topProducts.@") {
811811
Fetch(service: "reviews") {
812812
{
813-
... on Book {
814-
__typename
815-
isbn
816-
}
817813
... on Furniture {
818814
__typename
819815
upc
820816
}
817+
... on Book {
818+
__typename
819+
isbn
820+
}
821821
} =>
822822
{
823-
... on Book {
823+
... on Furniture {
824824
reviews {
825825
body
826826
}
827827
}
828-
... on Furniture {
828+
... on Book {
829829
reviews {
830830
body
831831
}
@@ -908,12 +908,12 @@ describe('buildQueryPlan', () => {
908908
{
909909
product(upc: "") {
910910
__typename
911-
... on Book {
911+
... on Furniture {
912912
details {
913913
country
914914
}
915915
}
916-
... on Furniture {
916+
... on Book {
917917
details {
918918
country
919919
}
@@ -966,17 +966,46 @@ describe('buildQueryPlan', () => {
966966
}
967967
fragment __QueryPlanFragment_0__ on Product {
968968
__typename
969-
... on Book {
970-
__typename
971-
isbn
972-
}
973969
... on Furniture {
974970
__typename
975971
upc
976972
}
973+
... on Book {
974+
__typename
975+
isbn
976+
}
977977
}
978978
},
979979
Parallel {
980+
Flatten(path: "[email protected]") {
981+
Fetch(service: "product") {
982+
{
983+
... on Furniture {
984+
__typename
985+
upc
986+
}
987+
... on Book {
988+
__typename
989+
isbn
990+
}
991+
} =>
992+
{
993+
... on Furniture {
994+
name
995+
price
996+
details {
997+
country
998+
}
999+
}
1000+
... on Book {
1001+
price
1002+
details {
1003+
country
1004+
}
1005+
}
1006+
}
1007+
},
1008+
},
9801009
Sequence {
9811010
Flatten(path: "[email protected]") {
9821011
Fetch(service: "books") {
@@ -1014,35 +1043,6 @@ describe('buildQueryPlan', () => {
10141043
},
10151044
},
10161045
},
1017-
Flatten(path: "[email protected]") {
1018-
Fetch(service: "product") {
1019-
{
1020-
... on Furniture {
1021-
__typename
1022-
upc
1023-
}
1024-
... on Book {
1025-
__typename
1026-
isbn
1027-
}
1028-
} =>
1029-
{
1030-
... on Furniture {
1031-
name
1032-
price
1033-
details {
1034-
country
1035-
}
1036-
}
1037-
... on Book {
1038-
price
1039-
details {
1040-
country
1041-
}
1042-
}
1043-
}
1044-
},
1045-
},
10461046
},
10471047
},
10481048
}
@@ -1152,17 +1152,46 @@ describe('buildQueryPlan', () => {
11521152
}
11531153
fragment __QueryPlanFragment_0__ on Product {
11541154
__typename
1155-
... on Book {
1156-
__typename
1157-
isbn
1158-
}
11591155
... on Furniture {
11601156
__typename
11611157
upc
11621158
}
1159+
... on Book {
1160+
__typename
1161+
isbn
1162+
}
11631163
}
11641164
},
11651165
Parallel {
1166+
Flatten(path: "[email protected]") {
1167+
Fetch(service: "product") {
1168+
{
1169+
... on Furniture {
1170+
__typename
1171+
upc
1172+
}
1173+
... on Book {
1174+
__typename
1175+
isbn
1176+
}
1177+
} =>
1178+
{
1179+
... on Furniture {
1180+
name
1181+
cost: price
1182+
details {
1183+
origin: country
1184+
}
1185+
}
1186+
... on Book {
1187+
cost: price
1188+
details {
1189+
origin: country
1190+
}
1191+
}
1192+
}
1193+
},
1194+
},
11661195
Sequence {
11671196
Flatten(path: "[email protected]") {
11681197
Fetch(service: "books") {
@@ -1200,35 +1229,6 @@ describe('buildQueryPlan', () => {
12001229
},
12011230
},
12021231
},
1203-
Flatten(path: "[email protected]") {
1204-
Fetch(service: "product") {
1205-
{
1206-
... on Furniture {
1207-
__typename
1208-
upc
1209-
}
1210-
... on Book {
1211-
__typename
1212-
isbn
1213-
}
1214-
} =>
1215-
{
1216-
... on Furniture {
1217-
name
1218-
cost: price
1219-
details {
1220-
origin: country
1221-
}
1222-
}
1223-
... on Book {
1224-
cost: price
1225-
details {
1226-
origin: country
1227-
}
1228-
}
1229-
}
1230-
},
1231-
},
12321232
},
12331233
},
12341234
}

0 commit comments

Comments
 (0)