Skip to content

Commit e009f52

Browse files
committed
chore(deps): update dependency graphql to v15
In a general sense this just updates tests to accommodate the new error conditions and schema hashes since a lot of the work has already been done in #3712 / 131c9b8. A larger note is due to explain the updating the snapshots. Those changes are due the fact that 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 Ref: #3712 (131c9b8)
1 parent f840d9e commit e009f52

File tree

5 files changed

+87
-90
lines changed

5 files changed

+87
-90
lines changed

package-lock.json

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"express": "4.17.1",
101101
"fastify": "2.14.1",
102102
"form-data": "2.5.1",
103-
"graphql": "14.6.0",
103+
"graphql": "15.0.0",
104104
"graphql-tag": "2.10.3",
105105
"graphql-tools": "4.0.8",
106106
"hapi": "17.8.5",

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

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,10 @@ describe('buildQueryPlan', () => {
755755
{
756756
topProducts {
757757
__typename
758-
... on Book {
758+
... on Furniture {
759759
price
760760
}
761-
... on Furniture {
761+
... on Book {
762762
price
763763
}
764764
}
@@ -793,38 +793,38 @@ describe('buildQueryPlan', () => {
793793
{
794794
topProducts {
795795
__typename
796-
... on Book {
796+
... on Furniture {
797797
price
798798
__typename
799-
isbn
799+
upc
800800
}
801-
... on Furniture {
801+
... on Book {
802802
price
803803
__typename
804-
upc
804+
isbn
805805
}
806806
}
807807
}
808808
},
809809
Flatten(path: "topProducts.@") {
810810
Fetch(service: "reviews") {
811811
{
812-
... on Book {
813-
__typename
814-
isbn
815-
}
816812
... on Furniture {
817813
__typename
818814
upc
819815
}
816+
... on Book {
817+
__typename
818+
isbn
819+
}
820820
} =>
821821
{
822-
... on Book {
822+
... on Furniture {
823823
reviews {
824824
body
825825
}
826826
}
827-
... on Furniture {
827+
... on Book {
828828
reviews {
829829
body
830830
}
@@ -907,12 +907,12 @@ describe('buildQueryPlan', () => {
907907
{
908908
product(upc: "") {
909909
__typename
910-
... on Book {
910+
... on Furniture {
911911
details {
912912
country
913913
}
914914
}
915-
... on Furniture {
915+
... on Book {
916916
details {
917917
country
918918
}
@@ -965,17 +965,46 @@ describe('buildQueryPlan', () => {
965965
}
966966
fragment __QueryPlanFragment_0__ on Product {
967967
__typename
968-
... on Book {
969-
__typename
970-
isbn
971-
}
972968
... on Furniture {
973969
__typename
974970
upc
975971
}
972+
... on Book {
973+
__typename
974+
isbn
975+
}
976976
}
977977
},
978978
Parallel {
979+
Flatten(path: "[email protected]") {
980+
Fetch(service: "product") {
981+
{
982+
... on Furniture {
983+
__typename
984+
upc
985+
}
986+
... on Book {
987+
__typename
988+
isbn
989+
}
990+
} =>
991+
{
992+
... on Furniture {
993+
name
994+
price
995+
details {
996+
country
997+
}
998+
}
999+
... on Book {
1000+
price
1001+
details {
1002+
country
1003+
}
1004+
}
1005+
}
1006+
},
1007+
},
9791008
Sequence {
9801009
Flatten(path: "[email protected]") {
9811010
Fetch(service: "books") {
@@ -1013,35 +1042,6 @@ describe('buildQueryPlan', () => {
10131042
},
10141043
},
10151044
},
1016-
Flatten(path: "[email protected]") {
1017-
Fetch(service: "product") {
1018-
{
1019-
... on Furniture {
1020-
__typename
1021-
upc
1022-
}
1023-
... on Book {
1024-
__typename
1025-
isbn
1026-
}
1027-
} =>
1028-
{
1029-
... on Furniture {
1030-
name
1031-
price
1032-
details {
1033-
country
1034-
}
1035-
}
1036-
... on Book {
1037-
price
1038-
details {
1039-
country
1040-
}
1041-
}
1042-
}
1043-
},
1044-
},
10451045
},
10461046
},
10471047
}
@@ -1151,17 +1151,46 @@ describe('buildQueryPlan', () => {
11511151
}
11521152
fragment __QueryPlanFragment_0__ on Product {
11531153
__typename
1154-
... on Book {
1155-
__typename
1156-
isbn
1157-
}
11581154
... on Furniture {
11591155
__typename
11601156
upc
11611157
}
1158+
... on Book {
1159+
__typename
1160+
isbn
1161+
}
11621162
}
11631163
},
11641164
Parallel {
1165+
Flatten(path: "[email protected]") {
1166+
Fetch(service: "product") {
1167+
{
1168+
... on Furniture {
1169+
__typename
1170+
upc
1171+
}
1172+
... on Book {
1173+
__typename
1174+
isbn
1175+
}
1176+
} =>
1177+
{
1178+
... on Furniture {
1179+
name
1180+
cost: price
1181+
details {
1182+
origin: country
1183+
}
1184+
}
1185+
... on Book {
1186+
cost: price
1187+
details {
1188+
origin: country
1189+
}
1190+
}
1191+
}
1192+
},
1193+
},
11651194
Sequence {
11661195
Flatten(path: "[email protected]") {
11671196
Fetch(service: "books") {
@@ -1199,35 +1228,6 @@ describe('buildQueryPlan', () => {
11991228
},
12001229
},
12011230
},
1202-
Flatten(path: "[email protected]") {
1203-
Fetch(service: "product") {
1204-
{
1205-
... on Furniture {
1206-
__typename
1207-
upc
1208-
}
1209-
... on Book {
1210-
__typename
1211-
isbn
1212-
}
1213-
} =>
1214-
{
1215-
... on Furniture {
1216-
name
1217-
cost: price
1218-
details {
1219-
origin: country
1220-
}
1221-
}
1222-
... on Book {
1223-
cost: price
1224-
details {
1225-
origin: country
1226-
}
1227-
}
1228-
}
1229-
},
1230-
},
12311231
},
12321232
},
12331233
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('ApolloGateway executor', () => {
2828
});
2929

3030
expect(errors![0].message).toMatch(
31-
'Variable "$first" got invalid value "3"; Expected type Int.',
31+
'Variable "$first" got invalid value "3"; Int cannot represent non-integer value: "3"',
3232
);
3333
});
3434

packages/apollo-server-core/src/__tests__/runQuery.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ describe('runQuery', () => {
427427
const invocation = requestDidStart.mock.calls[0][0];
428428
expect(invocation).toHaveProperty('schema', schema);
429429
expect(invocation).toHaveProperty( /* Shorter as a RegExp */
430-
'schemaHash', expect.stringMatching(/^8ff87f3e0/));
430+
'schemaHash', expect.stringMatching(/^cce9f33a/));
431431
});
432432
});
433433

0 commit comments

Comments
 (0)