@apollo/gateway 0.48.3 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/__generated__/graphqlTypes.d.ts +1 -0
  2. package/dist/__generated__/graphqlTypes.d.ts.map +1 -1
  3. package/dist/config.d.ts +6 -2
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +1 -0
  6. package/dist/config.js.map +1 -1
  7. package/dist/executeQueryPlan.d.ts.map +1 -1
  8. package/dist/executeQueryPlan.js +4 -3
  9. package/dist/executeQueryPlan.js.map +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +14 -7
  12. package/dist/index.js.map +1 -1
  13. package/dist/supergraphManagers/UplinkFetcher/index.d.ts +3 -1
  14. package/dist/supergraphManagers/UplinkFetcher/index.d.ts.map +1 -1
  15. package/dist/supergraphManagers/UplinkFetcher/index.js +20 -4
  16. package/dist/supergraphManagers/UplinkFetcher/index.js.map +1 -1
  17. package/dist/supergraphManagers/UplinkFetcher/loadSupergraphSdlFromStorage.d.ts +3 -2
  18. package/dist/supergraphManagers/UplinkFetcher/loadSupergraphSdlFromStorage.d.ts.map +1 -1
  19. package/dist/supergraphManagers/UplinkFetcher/loadSupergraphSdlFromStorage.js +9 -3
  20. package/dist/supergraphManagers/UplinkFetcher/loadSupergraphSdlFromStorage.js.map +1 -1
  21. package/package.json +4 -4
  22. package/src/__generated__/graphqlTypes.ts +1 -1
  23. package/src/__tests__/CucumberREADME.md +1 -0
  24. package/src/__tests__/build-query-plan-fragmentization.feature +10 -0
  25. package/src/__tests__/build-query-plan.feature +84 -16
  26. package/src/__tests__/buildQueryPlan.test.ts +272 -1
  27. package/src/__tests__/gateway/lifecycle-hooks.test.ts +3 -3
  28. package/src/__tests__/gateway/reporting.test.ts +4 -0
  29. package/src/__tests__/gateway/supergraphSdl.test.ts +3 -3
  30. package/src/__tests__/integration/abstract-types.test.ts +3 -3
  31. package/src/__tests__/integration/configuration.test.ts +0 -11
  32. package/src/__tests__/integration/requires.test.ts +1 -1
  33. package/src/__tests__/integration/value-types.test.ts +1 -1
  34. package/src/config.ts +11 -6
  35. package/src/executeQueryPlan.ts +4 -0
  36. package/src/index.ts +12 -6
  37. package/src/supergraphManagers/UplinkFetcher/__tests__/loadSupergraphSdlFromStorage.test.ts +41 -0
  38. package/src/supergraphManagers/UplinkFetcher/index.ts +37 -18
  39. package/src/supergraphManagers/UplinkFetcher/loadSupergraphSdlFromStorage.ts +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo/gateway",
3
- "version": "0.48.3",
3
+ "version": "0.49.0",
4
4
  "description": "Apollo Gateway",
5
5
  "author": "Apollo <packages@apollographql.com>",
6
6
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@apollo/core-schema": "^0.2.0",
29
- "@apollo/federation": "^0.35.3",
30
- "@apollo/query-planner": "^0.8.2",
29
+ "@apollo/federation": "^0.35.4",
30
+ "@apollo/query-planner": "^0.9.0",
31
31
  "@josephg/resolvable": "^1.0.1",
32
32
  "@opentelemetry/api": "^1.0.1",
33
33
  "@types/node-fetch": "2.6.1",
@@ -47,5 +47,5 @@
47
47
  "peerDependencies": {
48
48
  "graphql": "^15.8.0 || ^16.0.0"
49
49
  },
50
- "gitHead": "5a5f30f059c0a1f96ebffd2b5c766b90f8899c04"
50
+ "gitHead": "6103260972dc4913aa640c49d5630d2f0a77cec3"
51
51
  }
@@ -139,7 +139,7 @@ export type SupergraphSdlQueryVariables = Exact<{
139
139
  }>;
140
140
 
141
141
 
142
- export type SupergraphSdlQuery = { __typename?: 'Query', routerConfig: { __typename: 'FetchError', code: FetchErrorCode, message: string } | { __typename: 'RouterConfigResult', id: string, supergraphSdl: string } | { __typename: 'Unchanged' } };
142
+ export type SupergraphSdlQuery = { __typename?: 'Query', routerConfig: { __typename: 'FetchError', code: FetchErrorCode, message: string } | { __typename: 'RouterConfigResult', id: string, minDelaySeconds: number, supergraphSdl: string } | { __typename: 'Unchanged' } };
143
143
 
144
144
  export type OobReportMutationVariables = Exact<{
145
145
  input?: InputMaybe<ApiMonitoringReport>;
@@ -46,6 +46,7 @@ Scenario: should not confuse union types with overlapping field names
46
46
  "kind": "Fetch",
47
47
  "serviceName": "documents",
48
48
  "variableUsages": [],
49
+ "operationKind": "query",
49
50
  "operation": "{body{__typename ...on Image{attributes{url}}...on Text{attributes{bold text}}}}"
50
51
  }
51
52
  }
@@ -29,6 +29,7 @@ Scenario: experimental compression to downstream services should generate fragme
29
29
  "kind": "Fetch",
30
30
  "serviceName": "reviews",
31
31
  "variableUsages": [],
32
+ "operationKind": "query",
32
33
  "operation": "{topReviews{...__QueryPlanFragment_1__}}fragment __QueryPlanFragment_1__ on Review{body author product{...__QueryPlanFragment_0__}}fragment __QueryPlanFragment_0__ on Product{__typename ...on Book{__typename isbn}...on Furniture{__typename upc}}"
33
34
  },
34
35
  {
@@ -54,6 +55,7 @@ Scenario: experimental compression to downstream services should generate fragme
54
55
  }
55
56
  ],
56
57
  "variableUsages": [],
58
+ "operationKind": "query",
57
59
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{__typename isbn title year}}}"
58
60
  }
59
61
  },
@@ -76,6 +78,7 @@ Scenario: experimental compression to downstream services should generate fragme
76
78
  }
77
79
  ],
78
80
  "variableUsages": [],
81
+ "operationKind": "query",
79
82
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
80
83
  }
81
84
  }
@@ -106,6 +109,7 @@ Scenario: experimental compression to downstream services should generate fragme
106
109
  }
107
110
  ],
108
111
  "variableUsages": [],
112
+ "operationKind": "query",
109
113
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name price details{country}}...on Book{price details{country}}}}"
110
114
  }
111
115
  }
@@ -135,6 +139,7 @@ Scenario: experimental compression to downstream services shouldn't generate fra
135
139
  "kind": "Fetch",
136
140
  "serviceName": "reviews",
137
141
  "variableUsages": [],
142
+ "operationKind": "query",
138
143
  "operation": "{topReviews{body author}}"
139
144
  }
140
145
  }
@@ -160,6 +165,7 @@ Scenario: experimental compression to downstream services should generate fragme
160
165
  "kind": "Fetch",
161
166
  "serviceName": "reviews",
162
167
  "variableUsages": [],
168
+ "operationKind": "query",
163
169
  "operation": "{topReviews{...__QueryPlanFragment_0__}}fragment __QueryPlanFragment_0__ on Review{id body author}"
164
170
  }
165
171
  }
@@ -194,6 +200,7 @@ Scenario: experimental compression to downstream services should generate fragme
194
200
  "kind": "Fetch",
195
201
  "serviceName": "reviews",
196
202
  "variableUsages": [],
203
+ "operationKind": "query",
197
204
  "operation": "{reviews:topReviews{...__QueryPlanFragment_1__}}fragment __QueryPlanFragment_1__ on Review{content:body author product{...__QueryPlanFragment_0__}}fragment __QueryPlanFragment_0__ on Product{__typename ...on Book{__typename isbn}...on Furniture{__typename upc}}"
198
205
  },
199
206
  {
@@ -219,6 +226,7 @@ Scenario: experimental compression to downstream services should generate fragme
219
226
  }
220
227
  ],
221
228
  "variableUsages": [],
229
+ "operationKind": "query",
222
230
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{__typename isbn title year}}}"
223
231
  }
224
232
  },
@@ -241,6 +249,7 @@ Scenario: experimental compression to downstream services should generate fragme
241
249
  }
242
250
  ],
243
251
  "variableUsages": [],
252
+ "operationKind": "query",
244
253
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
245
254
  }
246
255
  }
@@ -271,6 +280,7 @@ Scenario: experimental compression to downstream services should generate fragme
271
280
  }
272
281
  ],
273
282
  "variableUsages": [],
283
+ "operationKind": "query",
274
284
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name cost:price details{origin:country}}...on Book{cost:price details{origin:country}}}}"
275
285
  }
276
286
  }
@@ -27,6 +27,7 @@ Scenario: should not confuse union types with overlapping field names
27
27
  "kind": "Fetch",
28
28
  "serviceName": "documents",
29
29
  "variableUsages": [],
30
+ "operationKind": "query",
30
31
  "operation": "{body{__typename ...on Image{attributes{url}}...on Text{attributes{bold text}}}}"
31
32
  }
32
33
  }
@@ -49,6 +50,7 @@ Scenario: should use a single fetch when requesting a root field from one servic
49
50
  "kind": "Fetch",
50
51
  "serviceName": "accounts",
51
52
  "variableUsages": [],
53
+ "operationKind": "query",
52
54
  "operation": "{me{name}}"
53
55
  }
54
56
  }
@@ -77,6 +79,7 @@ Scenario: should use two independent fetches when requesting root fields from tw
77
79
  "kind": "Fetch",
78
80
  "serviceName": "accounts",
79
81
  "variableUsages": [],
82
+ "operationKind": "query",
80
83
  "operation": "{me{name}}"
81
84
  },
82
85
  {
@@ -86,6 +89,7 @@ Scenario: should use two independent fetches when requesting root fields from tw
86
89
  "kind": "Fetch",
87
90
  "serviceName": "product",
88
91
  "variableUsages": [],
92
+ "operationKind": "query",
89
93
  "operation": "{topProducts{__typename ...on Book{__typename isbn}...on Furniture{name}}}"
90
94
  },
91
95
  {
@@ -105,6 +109,7 @@ Scenario: should use two independent fetches when requesting root fields from tw
105
109
  }
106
110
  ],
107
111
  "variableUsages": [],
112
+ "operationKind": "query",
108
113
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{__typename isbn title year}}}"
109
114
  }
110
115
  },
@@ -127,6 +132,7 @@ Scenario: should use two independent fetches when requesting root fields from tw
127
132
  }
128
133
  ],
129
134
  "variableUsages": [],
135
+ "operationKind": "query",
130
136
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
131
137
  }
132
138
  }
@@ -160,6 +166,7 @@ Scenario: should use a single fetch when requesting multiple root fields from th
160
166
  "kind": "Fetch",
161
167
  "serviceName": "product",
162
168
  "variableUsages": [],
169
+ "operationKind": "query",
163
170
  "operation": "{topProducts{__typename ...on Book{__typename isbn}...on Furniture{name}}product(upc:\"1\"){__typename ...on Book{__typename isbn}...on Furniture{name}}}"
164
171
  },
165
172
  {
@@ -185,6 +192,7 @@ Scenario: should use a single fetch when requesting multiple root fields from th
185
192
  }
186
193
  ],
187
194
  "variableUsages": [],
195
+ "operationKind": "query",
188
196
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{__typename isbn title year}}}"
189
197
  }
190
198
  },
@@ -207,6 +215,7 @@ Scenario: should use a single fetch when requesting multiple root fields from th
207
215
  }
208
216
  ],
209
217
  "variableUsages": [],
218
+ "operationKind": "query",
210
219
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
211
220
  }
212
221
  }
@@ -232,6 +241,7 @@ Scenario: should use a single fetch when requesting multiple root fields from th
232
241
  }
233
242
  ],
234
243
  "variableUsages": [],
244
+ "operationKind": "query",
235
245
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{__typename isbn title year}}}"
236
246
  }
237
247
  },
@@ -254,6 +264,7 @@ Scenario: should use a single fetch when requesting multiple root fields from th
254
264
  }
255
265
  ],
256
266
  "variableUsages": [],
267
+ "operationKind": "query",
257
268
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
258
269
  }
259
270
  }
@@ -288,6 +299,7 @@ Scenario: should use a single fetch when requesting relationship subfields from
288
299
  "kind": "Fetch",
289
300
  "serviceName": "reviews",
290
301
  "variableUsages": [],
302
+ "operationKind": "query",
291
303
  "operation": "{topReviews{body author{reviews{body}}}}"
292
304
  }
293
305
  }
@@ -316,6 +328,7 @@ Scenario: should use a single fetch when requesting relationship subfields and p
316
328
  "kind": "Fetch",
317
329
  "serviceName": "reviews",
318
330
  "variableUsages": [],
331
+ "operationKind": "query",
319
332
  "operation": "{topReviews{body author{id reviews{body}}}}"
320
333
  }
321
334
  }
@@ -344,6 +357,7 @@ Scenario: when requesting an extension field from another service, it should add
344
357
  "kind": "Fetch",
345
358
  "serviceName": "accounts",
346
359
  "variableUsages": [],
360
+ "operationKind": "query",
347
361
  "operation": "{me{name __typename id}}"
348
362
  },
349
363
  {
@@ -363,6 +377,7 @@ Scenario: when requesting an extension field from another service, it should add
363
377
  }
364
378
  ],
365
379
  "variableUsages": [],
380
+ "operationKind": "query",
366
381
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{body}}}}"
367
382
  }
368
383
  }
@@ -393,6 +408,7 @@ Scenario: when requesting an extension field from another service, when the pare
393
408
  "kind": "Fetch",
394
409
  "serviceName": "accounts",
395
410
  "variableUsages": [],
411
+ "operationKind": "query",
396
412
  "operation": "{me{__typename id}}"
397
413
  },
398
414
  {
@@ -412,6 +428,7 @@ Scenario: when requesting an extension field from another service, when the pare
412
428
  }
413
429
  ],
414
430
  "variableUsages": [],
431
+ "operationKind": "query",
415
432
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{body}}}}"
416
433
  }
417
434
  }
@@ -443,6 +460,7 @@ Scenario: when requesting an extension field from another service, should only a
443
460
  "kind": "Fetch",
444
461
  "serviceName": "accounts",
445
462
  "variableUsages": [],
463
+ "operationKind": "query",
446
464
  "operation": "{me{__typename id}}"
447
465
  },
448
466
  {
@@ -462,6 +480,7 @@ Scenario: when requesting an extension field from another service, should only a
462
480
  }
463
481
  ],
464
482
  "variableUsages": [],
483
+ "operationKind": "query",
465
484
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{body}numberOfReviews}}}"
466
485
  }
467
486
  }
@@ -493,6 +512,7 @@ Scenario: when requesting a composite field with subfields from another service,
493
512
  "kind": "Fetch",
494
513
  "serviceName": "reviews",
495
514
  "variableUsages": [],
515
+ "operationKind": "query",
496
516
  "operation": "{topReviews{body author{__typename id}}}"
497
517
  },
498
518
  {
@@ -512,6 +532,7 @@ Scenario: when requesting a composite field with subfields from another service,
512
532
  }
513
533
  ],
514
534
  "variableUsages": [],
535
+ "operationKind": "query",
515
536
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{name}}}"
516
537
  }
517
538
  }
@@ -540,6 +561,7 @@ Scenario: when requesting a composite field with subfields from another service,
540
561
  "kind": "Fetch",
541
562
  "serviceName": "product",
542
563
  "variableUsages": [],
564
+ "operationKind": "query",
543
565
  "operation": "{topCars{__typename id price}}"
544
566
  },
545
567
  {
@@ -560,6 +582,7 @@ Scenario: when requesting a composite field with subfields from another service,
560
582
  }
561
583
  ],
562
584
  "variableUsages": [],
585
+ "operationKind": "query",
563
586
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Car{retailPrice}}}"
564
587
  }
565
588
  }
@@ -590,6 +613,7 @@ Scenario: when requesting a composite field with subfields from another service,
590
613
  "kind": "Fetch",
591
614
  "serviceName": "reviews",
592
615
  "variableUsages": [],
616
+ "operationKind": "query",
593
617
  "operation": "{topReviews{author{__typename id}}}"
594
618
  },
595
619
  {
@@ -609,6 +633,7 @@ Scenario: when requesting a composite field with subfields from another service,
609
633
  }
610
634
  ],
611
635
  "variableUsages": [],
636
+ "operationKind": "query",
612
637
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{name}}}"
613
638
  }
614
639
  }
@@ -639,6 +664,7 @@ Scenario: when requesting a relationship field with extension subfields from a d
639
664
  "kind": "Fetch",
640
665
  "serviceName": "reviews",
641
666
  "variableUsages": [],
667
+ "operationKind": "query",
642
668
  "operation": "{topReviews{author{__typename id}}}"
643
669
  },
644
670
  {
@@ -658,6 +684,7 @@ Scenario: when requesting a relationship field with extension subfields from a d
658
684
  }
659
685
  ],
660
686
  "variableUsages": [],
687
+ "operationKind": "query",
661
688
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{birthDate}}}"
662
689
  }
663
690
  }
@@ -683,6 +710,7 @@ Scenario: for abstract types, it should add __typename when fetching objects of
683
710
  "kind": "Fetch",
684
711
  "serviceName": "product",
685
712
  "variableUsages": [],
713
+ "operationKind": "query",
686
714
  "operation": "{topProducts{__typename ...on Book{price}...on Furniture{price}}}"
687
715
  }
688
716
  }
@@ -711,6 +739,7 @@ Scenario: should break up when traversing an extension field on an interface typ
711
739
  "kind": "Fetch",
712
740
  "serviceName": "product",
713
741
  "variableUsages": [],
742
+ "operationKind": "query",
714
743
  "operation": "{topProducts{__typename ...on Book{price __typename isbn}...on Furniture{price __typename upc}}}"
715
744
  },
716
745
  {
@@ -738,6 +767,7 @@ Scenario: should break up when traversing an extension field on an interface typ
738
767
  }
739
768
  ],
740
769
  "variableUsages": [],
770
+ "operationKind": "query",
741
771
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{reviews{body}}...on Furniture{reviews{body}}}}"
742
772
  }
743
773
  }
@@ -771,6 +801,7 @@ Scenario: interface fragments should expand into possible types only
771
801
  "kind": "Fetch",
772
802
  "serviceName": "books",
773
803
  "variableUsages": [],
804
+ "operationKind": "query",
774
805
  "operation": "{books{__typename isbn title year}}"
775
806
  },
776
807
  {
@@ -792,6 +823,7 @@ Scenario: interface fragments should expand into possible types only
792
823
  }
793
824
  ],
794
825
  "variableUsages": [],
826
+ "operationKind": "query",
795
827
  "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{name}}}"
796
828
  }
797
829
  }
@@ -819,6 +851,7 @@ Scenario: interface inside interface should expand into possible types only
819
851
  "kind": "Fetch",
820
852
  "serviceName": "product",
821
853
  "variableUsages": [],
854
+ "operationKind": "query",
822
855
  "operation": "{product(upc:\"\"){__typename ...on Book{details{country}}...on Furniture{details{country}}}}"
823
856
  }
824
857
  }
@@ -860,6 +893,7 @@ Scenario: should properly expand nested unions with inline fragments
860
893
  "kind": "Fetch",
861
894
  "serviceName": "documents",
862
895
  "variableUsages": [],
896
+ "operationKind": "query",
863
897
  "operation": "{body{__typename ...on Image{attributes{url}}...on Text{attributes{bold}}}}"
864
898
  }
865
899
  }
@@ -902,6 +936,7 @@ Scenario: deduplicates fields / selections regardless of adjacency and type cond
902
936
  "kind": "Fetch",
903
937
  "serviceName": "documents",
904
938
  "variableUsages": [],
939
+ "operationKind": "query",
905
940
  "operation": "{body{__typename ...on Text{attributes{bold text}}}}"
906
941
  }
907
942
  }
@@ -937,6 +972,7 @@ Scenario: deduplicates fields / selections regardless of adjacency and type cond
937
972
  "kind": "Fetch",
938
973
  "serviceName": "documents",
939
974
  "variableUsages": [],
975
+ "operationKind": "query",
940
976
  "operation": "{body{__typename ...on Text{attributes{bold text}}}}"
941
977
  }
942
978
  }
@@ -962,7 +998,9 @@ Scenario: supports basic, single-service mutation
962
998
  "username",
963
999
  "password"
964
1000
  ],
965
- "operation": "mutation($username:String!$password:String!){login(username:$username password:$password){id}}"
1001
+ "operationKind": "mutation",
1002
+ "operation": "mutation Login__accounts__0($username:String!$password:String!){login(username:$username password:$password){id}}",
1003
+ "operationName": "Login__accounts__0"
966
1004
  }
967
1005
  }
968
1006
  """
@@ -995,7 +1033,9 @@ Scenario: supports mutations with a cross-service request
995
1033
  "username",
996
1034
  "password"
997
1035
  ],
998
- "operation": "mutation($username:String!$password:String!){login(username:$username password:$password){__typename id}}"
1036
+ "operationKind": "mutation",
1037
+ "operation": "mutation Login__accounts__0($username:String!$password:String!){login(username:$username password:$password){__typename id}}",
1038
+ "operationName": "Login__accounts__0"
999
1039
  },
1000
1040
  {
1001
1041
  "kind": "Flatten",
@@ -1022,7 +1062,9 @@ Scenario: supports mutations with a cross-service request
1022
1062
  }
1023
1063
  ],
1024
1064
  "variableUsages": [],
1025
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}"
1065
+ "operationKind": "query",
1066
+ "operation": "query Login__reviews__1($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}",
1067
+ "operationName": "Login__reviews__1"
1026
1068
  }
1027
1069
  },
1028
1070
  {
@@ -1053,7 +1095,9 @@ Scenario: supports mutations with a cross-service request
1053
1095
  }
1054
1096
  ],
1055
1097
  "variableUsages": [],
1056
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}"
1098
+ "operationKind": "query",
1099
+ "operation": "query Login__product__2($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}",
1100
+ "operationName": "Login__product__2"
1057
1101
  }
1058
1102
  }
1059
1103
  ]
@@ -1087,7 +1131,9 @@ Scenario: returning across service boundaries
1087
1131
  "upc",
1088
1132
  "body"
1089
1133
  ],
1090
- "operation": "mutation($upc:String!$body:String!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{__typename upc}}}"
1134
+ "operationKind": "mutation",
1135
+ "operation": "mutation Review__reviews__0($upc:String!$body:String!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{__typename upc}}}",
1136
+ "operationName": "Review__reviews__0"
1091
1137
  },
1092
1138
  {
1093
1139
  "kind": "Flatten",
@@ -1114,7 +1160,9 @@ Scenario: returning across service boundaries
1114
1160
  }
1115
1161
  ],
1116
1162
  "variableUsages": [],
1117
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name}}}"
1163
+ "operationKind": "query",
1164
+ "operation": "query Review__product__1($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name}}}",
1165
+ "operationName": "Review__product__1"
1118
1166
  }
1119
1167
  }
1120
1168
  ]
@@ -1160,7 +1208,9 @@ Scenario: supports multiple root mutations
1160
1208
  "username",
1161
1209
  "password"
1162
1210
  ],
1163
- "operation": "mutation($username:String!$password:String!){login(username:$username password:$password){__typename id}}"
1211
+ "operationKind": "mutation",
1212
+ "operation": "mutation LoginAndReview__accounts__0($username:String!$password:String!){login(username:$username password:$password){__typename id}}",
1213
+ "operationName": "LoginAndReview__accounts__0"
1164
1214
  },
1165
1215
  {
1166
1216
  "kind": "Flatten",
@@ -1187,7 +1237,9 @@ Scenario: supports multiple root mutations
1187
1237
  }
1188
1238
  ],
1189
1239
  "variableUsages": [],
1190
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}"
1240
+ "operationKind": "query",
1241
+ "operation": "query LoginAndReview__reviews__1($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}",
1242
+ "operationName": "LoginAndReview__reviews__1"
1191
1243
  }
1192
1244
  },
1193
1245
  {
@@ -1218,7 +1270,9 @@ Scenario: supports multiple root mutations
1218
1270
  }
1219
1271
  ],
1220
1272
  "variableUsages": [],
1221
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}"
1273
+ "operationKind": "query",
1274
+ "operation": "query LoginAndReview__product__2($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}",
1275
+ "operationName": "LoginAndReview__product__2"
1222
1276
  }
1223
1277
  },
1224
1278
  {
@@ -1228,7 +1282,9 @@ Scenario: supports multiple root mutations
1228
1282
  "upc",
1229
1283
  "body"
1230
1284
  ],
1231
- "operation": "mutation($upc:String!$body:String!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{__typename upc}}}"
1285
+ "operationKind": "mutation",
1286
+ "operation": "mutation LoginAndReview__reviews__3($upc:String!$body:String!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{__typename upc}}}",
1287
+ "operationName": "LoginAndReview__reviews__3"
1232
1288
  },
1233
1289
  {
1234
1290
  "kind": "Flatten",
@@ -1255,7 +1311,9 @@ Scenario: supports multiple root mutations
1255
1311
  }
1256
1312
  ],
1257
1313
  "variableUsages": [],
1258
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name}}}"
1314
+ "operationKind": "query",
1315
+ "operation": "query LoginAndReview__product__4($representations:[_Any!]!){_entities(representations:$representations){...on Furniture{name}}}",
1316
+ "operationName": "LoginAndReview__product__4"
1259
1317
  }
1260
1318
  }
1261
1319
  ]
@@ -1309,7 +1367,9 @@ Scenario: multiple root mutations with correct service order
1309
1367
  "body",
1310
1368
  "updatedReview"
1311
1369
  ],
1312
- "operation": "mutation($upc:String!$body:String!$updatedReview:UpdateReviewInput!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{upc}}updateReview(review:$updatedReview){id body}}"
1370
+ "operationKind": "mutation",
1371
+ "operation": "mutation LoginAndReview__reviews__0($upc:String!$body:String!$updatedReview:UpdateReviewInput!){reviewProduct(input:{upc:$upc body:$body}){__typename ...on Furniture{upc}}updateReview(review:$updatedReview){id body}}",
1372
+ "operationName": "LoginAndReview__reviews__0"
1313
1373
  },
1314
1374
  {
1315
1375
  "kind": "Fetch",
@@ -1318,7 +1378,9 @@ Scenario: multiple root mutations with correct service order
1318
1378
  "username",
1319
1379
  "password"
1320
1380
  ],
1321
- "operation": "mutation($username:String!$password:String!){login(username:$username password:$password){__typename id}}"
1381
+ "operationKind": "mutation",
1382
+ "operation": "mutation LoginAndReview__accounts__1($username:String!$password:String!){login(username:$username password:$password){__typename id}}",
1383
+ "operationName": "LoginAndReview__accounts__1"
1322
1384
  },
1323
1385
  {
1324
1386
  "kind": "Flatten",
@@ -1345,7 +1407,9 @@ Scenario: multiple root mutations with correct service order
1345
1407
  }
1346
1408
  ],
1347
1409
  "variableUsages": [],
1348
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}"
1410
+ "operationKind": "query",
1411
+ "operation": "query LoginAndReview__reviews__2($representations:[_Any!]!){_entities(representations:$representations){...on User{reviews{product{__typename ...on Book{__typename isbn}...on Furniture{upc}}}}}}",
1412
+ "operationName": "LoginAndReview__reviews__2"
1349
1413
  }
1350
1414
  },
1351
1415
  {
@@ -1376,7 +1440,9 @@ Scenario: multiple root mutations with correct service order
1376
1440
  }
1377
1441
  ],
1378
1442
  "variableUsages": [],
1379
- "operation": "query($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}"
1443
+ "operationKind": "query",
1444
+ "operation": "query LoginAndReview__product__3($representations:[_Any!]!){_entities(representations:$representations){...on Book{upc}}}",
1445
+ "operationName": "LoginAndReview__product__3"
1380
1446
  }
1381
1447
  },
1382
1448
  {
@@ -1385,7 +1451,9 @@ Scenario: multiple root mutations with correct service order
1385
1451
  "variableUsages": [
1386
1452
  "reviewId"
1387
1453
  ],
1388
- "operation": "mutation($reviewId:ID!){deleteReview(id:$reviewId)}"
1454
+ "operationKind": "mutation",
1455
+ "operation": "mutation LoginAndReview__reviews__4($reviewId:ID!){deleteReview(id:$reviewId)}",
1456
+ "operationName": "LoginAndReview__reviews__4"
1389
1457
  }
1390
1458
  ]
1391
1459
  }