Skip to content

Commit 1525da4

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 c676a73 commit 1525da4

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
@@ -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
}
@@ -861,12 +861,12 @@ describe('buildQueryPlan', () => {
861861
{
862862
product(upc: "") {
863863
__typename
864-
... on Book {
864+
... on Furniture {
865865
details {
866866
country
867867
}
868868
}
869-
... on Furniture {
869+
... on Book {
870870
details {
871871
country
872872
}
@@ -919,17 +919,46 @@ describe('buildQueryPlan', () => {
919919
}
920920
fragment __QueryPlanFragment_0__ on Product {
921921
__typename
922-
... on Book {
923-
__typename
924-
isbn
925-
}
926922
... on Furniture {
927923
__typename
928924
upc
929925
}
926+
... on Book {
927+
__typename
928+
isbn
929+
}
930930
}
931931
},
932932
Parallel {
933+
Flatten(path: "[email protected]") {
934+
Fetch(service: "product") {
935+
{
936+
... on Furniture {
937+
__typename
938+
upc
939+
}
940+
... on Book {
941+
__typename
942+
isbn
943+
}
944+
} =>
945+
{
946+
... on Furniture {
947+
name
948+
price
949+
details {
950+
country
951+
}
952+
}
953+
... on Book {
954+
price
955+
details {
956+
country
957+
}
958+
}
959+
}
960+
},
961+
},
933962
Sequence {
934963
Flatten(path: "[email protected]") {
935964
Fetch(service: "books") {
@@ -967,35 +996,6 @@ describe('buildQueryPlan', () => {
967996
},
968997
},
969998
},
970-
Flatten(path: "[email protected]") {
971-
Fetch(service: "product") {
972-
{
973-
... on Furniture {
974-
__typename
975-
upc
976-
}
977-
... on Book {
978-
__typename
979-
isbn
980-
}
981-
} =>
982-
{
983-
... on Furniture {
984-
name
985-
price
986-
details {
987-
country
988-
}
989-
}
990-
... on Book {
991-
price
992-
details {
993-
country
994-
}
995-
}
996-
}
997-
},
998-
},
999999
},
10001000
},
10011001
}
@@ -1105,17 +1105,46 @@ describe('buildQueryPlan', () => {
11051105
}
11061106
fragment __QueryPlanFragment_0__ on Product {
11071107
__typename
1108-
... on Book {
1109-
__typename
1110-
isbn
1111-
}
11121108
... on Furniture {
11131109
__typename
11141110
upc
11151111
}
1112+
... on Book {
1113+
__typename
1114+
isbn
1115+
}
11161116
}
11171117
},
11181118
Parallel {
1119+
Flatten(path: "[email protected]") {
1120+
Fetch(service: "product") {
1121+
{
1122+
... on Furniture {
1123+
__typename
1124+
upc
1125+
}
1126+
... on Book {
1127+
__typename
1128+
isbn
1129+
}
1130+
} =>
1131+
{
1132+
... on Furniture {
1133+
name
1134+
cost: price
1135+
details {
1136+
origin: country
1137+
}
1138+
}
1139+
... on Book {
1140+
cost: price
1141+
details {
1142+
origin: country
1143+
}
1144+
}
1145+
}
1146+
},
1147+
},
11191148
Sequence {
11201149
Flatten(path: "[email protected]") {
11211150
Fetch(service: "books") {
@@ -1153,35 +1182,6 @@ describe('buildQueryPlan', () => {
11531182
},
11541183
},
11551184
},
1156-
Flatten(path: "[email protected]") {
1157-
Fetch(service: "product") {
1158-
{
1159-
... on Furniture {
1160-
__typename
1161-
upc
1162-
}
1163-
... on Book {
1164-
__typename
1165-
isbn
1166-
}
1167-
} =>
1168-
{
1169-
... on Furniture {
1170-
name
1171-
cost: price
1172-
details {
1173-
origin: country
1174-
}
1175-
}
1176-
... on Book {
1177-
cost: price
1178-
details {
1179-
origin: country
1180-
}
1181-
}
1182-
}
1183-
},
1184-
},
11851185
},
11861186
},
11871187
}

0 commit comments

Comments
 (0)