@graphql-tools/delegate 10.1.2 → 10.1.3-alpha-c1f969d9556b274c8e1313a3d2a4742f231bc03a

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 (79) hide show
  1. package/CHANGELOG.md +2424 -0
  2. package/dist/index.cjs +2670 -0
  3. package/dist/index.d.cts +219 -0
  4. package/dist/index.d.ts +219 -0
  5. package/dist/index.js +2639 -0
  6. package/package.json +36 -47
  7. package/cjs/Subschema.js +0 -42
  8. package/cjs/Transformer.js +0 -72
  9. package/cjs/applySchemaTransforms.js +0 -12
  10. package/cjs/checkResultAndHandleErrors.js +0 -81
  11. package/cjs/createRequest.js +0 -129
  12. package/cjs/defaultMergedResolver.js +0 -308
  13. package/cjs/delegateToSchema.js +0 -209
  14. package/cjs/extractUnavailableFields.js +0 -155
  15. package/cjs/finalizeGatewayRequest.js +0 -462
  16. package/cjs/getDocumentMetadata.js +0 -25
  17. package/cjs/index.js +0 -16
  18. package/cjs/leftOver.js +0 -25
  19. package/cjs/mergeFields.js +0 -158
  20. package/cjs/package.json +0 -1
  21. package/cjs/prepareGatewayDocument.js +0 -436
  22. package/cjs/resolveExternalValue.js +0 -115
  23. package/cjs/subschemaConfig.js +0 -34
  24. package/cjs/symbols.js +0 -6
  25. package/cjs/types.js +0 -3
  26. package/esm/Subschema.js +0 -37
  27. package/esm/Transformer.js +0 -68
  28. package/esm/applySchemaTransforms.js +0 -9
  29. package/esm/checkResultAndHandleErrors.js +0 -76
  30. package/esm/createRequest.js +0 -124
  31. package/esm/defaultMergedResolver.js +0 -304
  32. package/esm/delegateToSchema.js +0 -204
  33. package/esm/extractUnavailableFields.js +0 -151
  34. package/esm/finalizeGatewayRequest.js +0 -458
  35. package/esm/getDocumentMetadata.js +0 -21
  36. package/esm/index.js +0 -13
  37. package/esm/leftOver.js +0 -20
  38. package/esm/mergeFields.js +0 -149
  39. package/esm/prepareGatewayDocument.js +0 -432
  40. package/esm/resolveExternalValue.js +0 -111
  41. package/esm/subschemaConfig.js +0 -29
  42. package/esm/symbols.js +0 -3
  43. package/esm/types.js +0 -1
  44. package/typings/Subschema.d.cts +0 -22
  45. package/typings/Subschema.d.ts +0 -22
  46. package/typings/Transformer.d.cts +0 -11
  47. package/typings/Transformer.d.ts +0 -11
  48. package/typings/applySchemaTransforms.d.cts +0 -3
  49. package/typings/applySchemaTransforms.d.ts +0 -3
  50. package/typings/checkResultAndHandleErrors.d.cts +0 -8
  51. package/typings/checkResultAndHandleErrors.d.ts +0 -8
  52. package/typings/createRequest.d.cts +0 -5
  53. package/typings/createRequest.d.ts +0 -5
  54. package/typings/defaultMergedResolver.d.cts +0 -9
  55. package/typings/defaultMergedResolver.d.ts +0 -9
  56. package/typings/delegateToSchema.d.cts +0 -6
  57. package/typings/delegateToSchema.d.ts +0 -6
  58. package/typings/extractUnavailableFields.d.cts +0 -4
  59. package/typings/extractUnavailableFields.d.ts +0 -4
  60. package/typings/finalizeGatewayRequest.d.cts +0 -3
  61. package/typings/finalizeGatewayRequest.d.ts +0 -3
  62. package/typings/getDocumentMetadata.d.cts +0 -6
  63. package/typings/getDocumentMetadata.d.ts +0 -6
  64. package/typings/index.d.cts +0 -13
  65. package/typings/index.d.ts +0 -13
  66. package/typings/leftOver.d.cts +0 -14
  67. package/typings/leftOver.d.ts +0 -14
  68. package/typings/mergeFields.d.cts +0 -11
  69. package/typings/mergeFields.d.ts +0 -11
  70. package/typings/prepareGatewayDocument.d.cts +0 -2
  71. package/typings/prepareGatewayDocument.d.ts +0 -2
  72. package/typings/resolveExternalValue.d.cts +0 -3
  73. package/typings/resolveExternalValue.d.ts +0 -3
  74. package/typings/subschemaConfig.d.cts +0 -3
  75. package/typings/subschemaConfig.d.ts +0 -3
  76. package/typings/symbols.d.cts +0 -3
  77. package/typings/symbols.d.ts +0 -3
  78. package/typings/types.d.cts +0 -138
  79. package/typings/types.d.ts +0 -138
package/CHANGELOG.md ADDED
@@ -0,0 +1,2424 @@
1
+ # @graphql-tools/delegate
2
+
3
+ ## 10.1.3-alpha-c1f969d9556b274c8e1313a3d2a4742f231bc03a
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118](https://github.com/graphql-hive/gateway/pull/118) [`c1f969d`](https://github.com/graphql-hive/gateway/commit/c1f969d9556b274c8e1313a3d2a4742f231bc03a) Thanks [@{](https://github.com/{)! - Do not ignore request selection set when overriding the fields
8
+
9
+ ```ts
10
+ import { buildSchema, graphql } from 'graphql';
11
+ import { addResolversToSchema } from '@graphql-tools/schema';
12
+ import { stitchSchemas } from '@graphql-tools/stitch';
13
+ import { delegateToSchema } from '@graphql-tools/delegate';
14
+
15
+ const sub_schema = addResolversToSchema({
16
+ schema: buildSchema(`
17
+ type Query {
18
+ current_user: User
19
+ }
20
+
21
+ type User {
22
+ id: ID!
23
+ name: String!
24
+ age: Int!
25
+ }
26
+ `),
27
+ resolvers: {
28
+ Query: {
29
+ current_user: () => ({ id: '5', name: 'John Doe', age: 10 }),
30
+ },
31
+ },
32
+ });
33
+
34
+ const stitched_schema = stitchSchemas({
35
+ subschemas: [
36
+ {
37
+ schema: sub_schema,
38
+ createProxyingResolver: (options) => {
39
+ return (_parent, _args, context, info) => {
40
+ const operationName = info.operation.name ? info.operation.name.value : undefined;
41
+ return delegateToSchema({
42
+ schema: options.subschemaConfig,
43
+ operation: options.operation,
44
+ context,
45
+ info,
46
+ operationName,
47
+ });
48
+ };
49
+ },
50
+ },
51
+ ],
52
+ resolvers: {
53
+
54
+ name: {
55
+ selectionSet: '{ age }',
56
+ resolve: (parent) => `${parent.name}(${parent.age})`, // Age should be here
57
+ },
58
+ },
59
+ },
60
+ });
61
+ ```
62
+
63
+ ## 10.1.1
64
+
65
+ ### Patch Changes
66
+
67
+ - [`342e044`](https://github.com/ardatan/graphql-tools/commit/342e044c7da74aaf5df6a90ce68973c525c9aa10)
68
+ Thanks [@ardatan](https://github.com/ardatan)! - Prevent extra queries to the same subgraph
69
+ multiple times on the same plan, and merge iterables correctly
70
+
71
+ ## 10.1.0
72
+
73
+ ### Minor Changes
74
+
75
+ - [#6619](https://github.com/ardatan/graphql-tools/pull/6619)
76
+ [`e9906eb`](https://github.com/ardatan/graphql-tools/commit/e9906eb311132ab902720e75bc787228d67c0e34)
77
+ Thanks [@kroupacz](https://github.com/kroupacz)! - Handle shared root field queries with aliases
78
+
79
+ ## 10.0.29
80
+
81
+ ### Patch Changes
82
+
83
+ - [#6620](https://github.com/ardatan/graphql-tools/pull/6620)
84
+ [`da1de08`](https://github.com/ardatan/graphql-tools/commit/da1de08c269a4cb3ed8240bf191833f7e75a6b01)
85
+ Thanks [@kroupacz](https://github.com/kroupacz)! - - fix `subtractSelectionSets()` method - find
86
+ field by its path correctly
87
+
88
+ ## 10.0.28
89
+
90
+ ### Patch Changes
91
+
92
+ - [`f470f49`](https://github.com/ardatan/graphql-tools/commit/f470f49f7d8445801a2983f14532124588f9f59e)
93
+ Thanks [@ardatan](https://github.com/ardatan)! - Support original format of "@stream"
94
+
95
+ ## 10.0.27
96
+
97
+ ### Patch Changes
98
+
99
+ - [`180f3f0`](https://github.com/ardatan/graphql-tools/commit/180f3f0c8362613eb3013ff12f2d5405cd987903)
100
+ Thanks [@ardatan](https://github.com/ardatan)! - Avoid extra calls if the keys are already
101
+ resolved
102
+
103
+ ## 10.0.26
104
+
105
+ ### Patch Changes
106
+
107
+ - [#6586](https://github.com/ardatan/graphql-tools/pull/6586)
108
+ [`8effad4`](https://github.com/ardatan/graphql-tools/commit/8effad4ffb9be1bca098b8cb6ce41b84ac7d9b6b)
109
+ Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
110
+ execution
111
+
112
+ ## 10.0.25
113
+
114
+ ### Patch Changes
115
+
116
+ - [#6579](https://github.com/ardatan/graphql-tools/pull/6579)
117
+ [`8a16b01`](https://github.com/ardatan/graphql-tools/commit/8a16b01296457bdcfbb111e02b6f6569ef8b04aa)
118
+ Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
119
+ execution
120
+
121
+ ## 10.0.24
122
+
123
+ ### Patch Changes
124
+
125
+ - [#6576](https://github.com/ardatan/graphql-tools/pull/6576)
126
+ [`4cdb462`](https://github.com/ardatan/graphql-tools/commit/4cdb46248774f2d5ae2757d40e1d55e83d7413b3)
127
+ Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements on upstream request
128
+ execution
129
+
130
+ ## 10.0.23
131
+
132
+ ### Patch Changes
133
+
134
+ - [#6573](https://github.com/ardatan/graphql-tools/pull/6573)
135
+ [`7e2938d`](https://github.com/ardatan/graphql-tools/commit/7e2938d45c6d0a6eb6b18b89f9f80e9b5b5c08db)
136
+ Thanks [@ardatan](https://github.com/ardatan)! - When there are two services like below then the
137
+ following query senty, the gateway tries to fetch `id` as an extra field because it considers `id`
138
+ might be needed while this is not correct. This patch avoids any extra calls, and forwards the
139
+ query as is to the 2nd service.
140
+
141
+ ```graphql
142
+ query {
143
+ viewer {
144
+ booksContainer(input: $input) {
145
+ edges {
146
+ cursor
147
+ node {
148
+ source {
149
+ # Book(upc=)
150
+ upc
151
+ }
152
+ }
153
+ }
154
+ pageInfo {
155
+ endCursor
156
+ }
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ ```graphql
163
+ type Book @key(fields: "id") @key(fields: "upc") {
164
+ id: ID!
165
+ upc: ID!
166
+ }
167
+ ```
168
+
169
+ ```graphql
170
+ type BookContainer { # the type that is used in a collection
171
+ id: ID!
172
+ # ... other stuff here
173
+ source: Book!
174
+ }
175
+
176
+ type Book @key(fields: "upc") {
177
+ upc: ID!
178
+ }
179
+
180
+ type Query {
181
+ viewer: Viewer
182
+ }
183
+
184
+ type Viewer {
185
+ booksContainer: BooksContainerResult
186
+ }
187
+
188
+ type BooksContainerResult {
189
+ edges: [BooksContainerEdge!]!
190
+ pageInfo: PageInfo!
191
+ }
192
+
193
+ type BooksContainerEdge {
194
+ node: BookContainer!
195
+ cursor: String!
196
+ }
197
+
198
+ type PageInfo {
199
+ endCursor: String
200
+ }
201
+ ```
202
+
203
+ ## 10.0.22
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies
208
+ [[`cf2ce5e`](https://github.com/ardatan/graphql-tools/commit/cf2ce5ed4773087cc324599f2812f4fb91398b21)]:
209
+ - @graphql-tools/utils@10.5.5
210
+ - @graphql-tools/batch-execute@9.0.5
211
+ - @graphql-tools/executor@1.3.2
212
+ - @graphql-tools/schema@10.0.7
213
+
214
+ ## 10.0.21
215
+
216
+ ### Patch Changes
217
+
218
+ - [#6471](https://github.com/ardatan/graphql-tools/pull/6471)
219
+ [`3163978`](https://github.com/ardatan/graphql-tools/commit/31639789ed385c91644c711fa4b451a5b3647e5f)
220
+ Thanks [@ardatan](https://github.com/ardatan)! - Fix broken complex-entity-call
221
+
222
+ ## 10.0.20
223
+
224
+ ### Patch Changes
225
+
226
+ - [#6469](https://github.com/ardatan/graphql-tools/pull/6469)
227
+ [`0e87805`](https://github.com/ardatan/graphql-tools/commit/0e8780572fb1a852c8f4d7c8a59b064ae92bdd6b)
228
+ Thanks [@User!](https://github.com/User!)! - Handle merged selection sets in the computed fields;
229
+
230
+ When a selection set for a computed field needs to be merged, resolve that required selection set
231
+ fully then resolve the computed field. In the following case, the selection set for the `author`
232
+ field in the `Post` type is merged with the selection set for the `authorId` field in the
233
+ `Comment` type.
234
+
235
+ ```graphql
236
+ type Query {
237
+ feed: [Post!]!
238
+ }
239
+
240
+ type Post {
241
+ id: ID! @computed(selectionSet: "{ comments { authorId } }")
242
+ }
243
+
244
+ type Comment {
245
+ id: ID!
246
+ authorId: ID!
247
+ }
248
+
249
+ type User {
250
+ id: ID!
251
+ name: String!
252
+ }
253
+ ```
254
+
255
+ ```graphql
256
+ type Post {
257
+ id: ID!
258
+ comments: [Comment!]!
259
+ }
260
+
261
+ type Comment {
262
+ id: ID!
263
+ }
264
+ ```
265
+
266
+ ## 10.0.19
267
+
268
+ ### Patch Changes
269
+
270
+ - [#6437](https://github.com/ardatan/graphql-tools/pull/6437)
271
+ [`3188051`](https://github.com/ardatan/graphql-tools/commit/3188051ae530772210e9f3a2c9615932ef13f497)
272
+ Thanks [@User](https://github.com/User), [@()](<https://github.com/()>),
273
+ [@{](https://github.com/{), [@{](https://github.com/{), [@{](https://github.com/{),
274
+ [@{](https://github.com/{), [@{](https://github.com/{)! - Fix the bug happens when a merged field
275
+ is a computed field requires another computed field requires a field from the initial subschema.
276
+
277
+ In the following test case, `totalOrdersPrices` needs `userOrders` which needs `lastName` from
278
+ initial `Query.user`. So the bug was skipping the dependencies of `userOrders` because it assumed
279
+ `lastName` already there by mistake.
280
+
281
+ ```ts
282
+ const schema1 = makeExecutableSchema({
283
+ typeDefs: /* GraphQL */ `
284
+ type User {
285
+ id: ID!
286
+ firstName: String!
287
+ lastName: String!
288
+ address: String
289
+ }
290
+
291
+ type Query {
292
+
293
+ }
294
+ `,
295
+ resolvers: {
296
+ Query: {
297
+ => {
298
+ return {
299
+ id: 1,
300
+ firstName: 'Jake',
301
+ lastName: 'Dawkins',
302
+ address: 'everywhere',
303
+ };
304
+ },
305
+ },
306
+ },
307
+ });
308
+ const schema2 = makeExecutableSchema({
309
+ typeDefs: /* GraphQL */ `
310
+ type UserOrder {
311
+ id: ID!
312
+ }
313
+
314
+ type User {
315
+ id: ID!
316
+ totalOrdersPrices: Int
317
+ aggregatedOrdersByStatus: Int
318
+ }
319
+
320
+ type Query {
321
+ userWithOrderDetails(userId: ID!, userOrderIds: [ID]): User
322
+ }
323
+ `,
324
+ resolvers: {
325
+ Query: {
326
+ userWithOrderDetails: (_root, { userId, userOrderIds }) => {
327
+ return {
328
+ id: userId,
329
+ userOrders: userOrderIds?.map((userOrderId: string) => ({ id: userOrderId })),
330
+ };
331
+ },
332
+ },
333
+
334
+ totalOrdersPrices(user) {
335
+ if (user.userOrders instanceof Error) {
336
+ return user.userOrders;
337
+ }
338
+ if (!user.userOrders) {
339
+ throw new Error('UserOrders is required');
340
+ }
341
+ return 0;
342
+ },
343
+ aggregatedOrdersByStatus(user) {
344
+ if (user.userOrders instanceof Error) {
345
+ return user.userOrders;
346
+ }
347
+ if (!user.userOrders) {
348
+ throw new Error('UserOrders is required');
349
+ }
350
+ return 1;
351
+ },
352
+ },
353
+ },
354
+ });
355
+ const schema3 = makeExecutableSchema({
356
+ typeDefs: /* GraphQL */ `
357
+ type User {
358
+ id: ID!
359
+ userOrders: [UserOrder!]
360
+ }
361
+
362
+ type UserOrder {
363
+ id: ID!
364
+ }
365
+
366
+ type Query {
367
+ userWithOrders(id: ID!, lastName: String): User
368
+ }
369
+ `,
370
+ resolvers: {
371
+ Query: {
372
+ userWithOrders: (_root, { id, lastName }) => {
373
+ return {
374
+ id,
375
+ lastName,
376
+ };
377
+ },
378
+ },
379
+
380
+ userOrders(user) {
381
+ if (!user.lastName) {
382
+ throw new Error('LastName is required');
383
+ }
384
+ return [
385
+ {
386
+ id: `${user.lastName}1`,
387
+ },
388
+ ];
389
+ },
390
+ },
391
+ },
392
+ });
393
+ const stitchedSchema = stitchSchemas({
394
+ subschemas: [
395
+ {
396
+ schema: schema1,
397
+ },
398
+ {
399
+ schema: schema2,
400
+ merge: {
401
+
402
+ selectionSet: '{ id }',
403
+ fieldName: 'userWithOrderDetails',
404
+ args: ({ id, userOrders }: { id: string; userOrders: any[] }) => ({
405
+ userId: id,
406
+ userOrderIds: userOrders?.map?.(({ id }: { id: string }) => id),
407
+ }),
408
+ fields: {
409
+ totalOrdersPrices: {
410
+ selectionSet: '{ userOrders { id } }',
411
+ computed: true,
412
+ },
413
+ aggregatedOrdersByStatus: {
414
+ selectionSet: '{ userOrders { id } }',
415
+ computed: true,
416
+ },
417
+ },
418
+ },
419
+ },
420
+ },
421
+ {
422
+ schema: schema3,
423
+ merge: {
424
+
425
+ selectionSet: '{ id }',
426
+ fieldName: 'userWithOrders',
427
+ args: ({ id, lastName }: { id: string; lastName: string }) => ({
428
+ id,
429
+ lastName,
430
+ }),
431
+ fields: {
432
+ userOrders: {
433
+ selectionSet: '{ lastName }',
434
+ computed: true,
435
+ },
436
+ },
437
+ },
438
+ },
439
+ },
440
+ ],
441
+ });
442
+ const res = await normalizedExecutor({
443
+ schema: stitchedSchema,
444
+ document: parse(/* GraphQL */ `
445
+ query User {
446
+ user {
447
+ aggregatedOrdersByStatus
448
+ totalOrdersPrices
449
+ }
450
+ }
451
+ `),
452
+ });
453
+ expect(res).toEqual({
454
+ data: {
455
+
456
+ aggregatedOrdersByStatus: 1,
457
+ totalOrdersPrices: 0,
458
+ },
459
+ },
460
+ });
461
+ ```
462
+
463
+ ## 10.0.18
464
+
465
+ ### Patch Changes
466
+
467
+ - [#6420](https://github.com/ardatan/graphql-tools/pull/6420)
468
+ [`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)
469
+ Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
470
+
471
+ - Added dependency
472
+ [`@repeaterjs/repeater@^3.0.6` ↗︎](https://www.npmjs.com/package/@repeaterjs/repeater/v/3.0.6)
473
+ (to `dependencies`)
474
+
475
+ - [#6420](https://github.com/ardatan/graphql-tools/pull/6420)
476
+ [`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)
477
+ Thanks [@ardatan](https://github.com/ardatan)! - Pass operation directives correctly to the
478
+ subschema;
479
+
480
+ ```graphql
481
+ query {
482
+ hello @someDir
483
+ }
484
+ ```
485
+
486
+ - [#6418](https://github.com/ardatan/graphql-tools/pull/6418)
487
+ [`da93c08`](https://github.com/ardatan/graphql-tools/commit/da93c08b4bc22b5c9be81ed57beba8577f33118a)
488
+ Thanks [@ardatan](https://github.com/ardatan)! - Fix extra inline fragments for all abstract types
489
+ in the upstream schema call
490
+
491
+ If there are two subschemas like below, the final `Node` interface is implemented by both `Oven`
492
+ and `Toaster` while they are not implemented in both schemas. In this case the query
493
+ `{ products { id ... on Node { id } } }` will need to be transformed to
494
+ `{ products { id ... on Oven { id } ... on Node { id } } }` for the first subschema. But
495
+ previously the query planner was automatically creating inline fragments for all possible types
496
+ which was not optimal. Now it adds inline fragments only if this case is seen.
497
+
498
+ ```graphql
499
+ type Query {
500
+ products: [Product]
501
+ }
502
+
503
+ union Product = Oven | Toaster
504
+
505
+ interface Node {
506
+ id: ID!
507
+ }
508
+
509
+ type Oven {
510
+ id: ID!
511
+ }
512
+
513
+ type Toaster implements Node {
514
+ id: ID!
515
+ warranty: Int
516
+ }
517
+ ```
518
+
519
+ And another one like below;
520
+
521
+ ```graphql
522
+ interface Node {
523
+ id: ID!
524
+ }
525
+
526
+ type Oven implements Node {
527
+ id: ID!
528
+ warranty: Int
529
+ }
530
+ ```
531
+
532
+ - Updated dependencies
533
+ [[`a867bbc`](https://github.com/ardatan/graphql-tools/commit/a867bbc9b5b91e89a09447797b4c02e22e47ddb4)]:
534
+ - @graphql-tools/executor@1.3.1
535
+ - @graphql-tools/utils@10.3.4
536
+
537
+ ## 10.0.17
538
+
539
+ ### Patch Changes
540
+
541
+ - [#6403](https://github.com/ardatan/graphql-tools/pull/6403)
542
+ [`3803897`](https://github.com/ardatan/graphql-tools/commit/3803897cef27b15bad1718819c5d75030afbe781)
543
+ Thanks [@ardatan](https://github.com/ardatan)! - Cleanup extra fields, empty inline fragments and
544
+ duplicate \_\_typename fields
545
+
546
+ ## 10.0.16
547
+
548
+ ### Patch Changes
549
+
550
+ - [`33e8146`](https://github.com/ardatan/graphql-tools/commit/33e8146e33aa17790ee76d14e52f62c684ee1b16)
551
+ Thanks [@ardatan](https://github.com/ardatan)! - Fail on query planning phase if the query plan is
552
+ not successful before the actual execution
553
+
554
+ - Updated dependencies
555
+ [[`33e8146`](https://github.com/ardatan/graphql-tools/commit/33e8146e33aa17790ee76d14e52f62c684ee1b16)]:
556
+ - @graphql-tools/executor@1.3.0
557
+
558
+ ## 10.0.15
559
+
560
+ ### Patch Changes
561
+
562
+ - [`d54b21a`](https://github.com/ardatan/graphql-tools/commit/d54b21a235f9632d320a32f15594ecd70b5eae29)
563
+ Thanks [@ardatan](https://github.com/ardatan)! - If an abstract type on the gateway resolves to a
564
+ type that does not exist on the gateway, return null instead of showing an error to the user
565
+
566
+ - [`d54b21a`](https://github.com/ardatan/graphql-tools/commit/d54b21a235f9632d320a32f15594ecd70b5eae29)
567
+ Thanks [@ardatan](https://github.com/ardatan)! - If an enum value coming from the subschema is not
568
+ available on gateway, do not show an error to the user but return null instead
569
+
570
+ ## 10.0.14
571
+
572
+ ### Patch Changes
573
+
574
+ - [#6356](https://github.com/ardatan/graphql-tools/pull/6356)
575
+ [`8094c37`](https://github.com/ardatan/graphql-tools/commit/8094c3733c745b2ccb7adcca38024c82c42319a0)
576
+ Thanks [@enisdenjo](https://github.com/enisdenjo)! - AggregateError errors are GraphQL located
577
+ errors
578
+
579
+ Instead of transforming the AggregateError itself to a GraphQL located error.
580
+
581
+ This is because of two reasons:
582
+
583
+ - AggregateError wont lose the instanceof its class
584
+ - Expanding the AggregateError errors will each contain the proper locations
585
+
586
+ ## 10.0.13
587
+
588
+ ### Patch Changes
589
+
590
+ - [#6312](https://github.com/ardatan/graphql-tools/pull/6312)
591
+ [`7b6f77a`](https://github.com/ardatan/graphql-tools/commit/7b6f77a46177def2488ab70ce938b94d0dcf3018)
592
+ Thanks [@ardatan](https://github.com/ardatan)! - Use native `Promise.withResolvers` when possible
593
+
594
+ ## 10.0.12
595
+
596
+ ### Patch Changes
597
+
598
+ - [#6278](https://github.com/ardatan/graphql-tools/pull/6278)
599
+ [`66c99d9`](https://github.com/ardatan/graphql-tools/commit/66c99d9c9e480cc4e1569b032952caea0ff69c0c)
600
+ Thanks [@ardatan](https://github.com/ardatan)! - Handle `@defer`
601
+
602
+ - Updated dependencies
603
+ [[`66c99d9`](https://github.com/ardatan/graphql-tools/commit/66c99d9c9e480cc4e1569b032952caea0ff69c0c),
604
+ [`74f995f`](https://github.com/ardatan/graphql-tools/commit/74f995f17dfea6385e08bcdd662e7ad6fcfb5dfa)]:
605
+ - @graphql-tools/utils@10.2.3
606
+ - @graphql-tools/executor@1.2.8
607
+
608
+ ## 10.0.11
609
+
610
+ ### Patch Changes
611
+
612
+ - [#6194](https://github.com/ardatan/graphql-tools/pull/6194)
613
+ [`7368829`](https://github.com/ardatan/graphql-tools/commit/73688291af0c8cb2fe550fe8c74fd8af84cb360f)
614
+ Thanks [@ardatan](https://github.com/ardatan)! - Handle interface objects in a different way
615
+
616
+ - [#6188](https://github.com/ardatan/graphql-tools/pull/6188)
617
+ [`e10c13a`](https://github.com/ardatan/graphql-tools/commit/e10c13a60e344b9217dc77a7cac50ec447feda7e)
618
+ Thanks [@ardatan](https://github.com/ardatan)! - Add `subtractSelectionSets` to get the diff of
619
+ two selection sets
620
+
621
+ - [#6187](https://github.com/ardatan/graphql-tools/pull/6187)
622
+ [`dfccfbf`](https://github.com/ardatan/graphql-tools/commit/dfccfbfd6633dd576f660c648f3c6cecff3667a1)
623
+ Thanks [@ardatan](https://github.com/ardatan)! - Do not merge errors and regular resolved objects
624
+
625
+ If a subschema returns an error for specific field that is already resolved by another subschema,
626
+ the error should not be merged with the resolved object.
627
+
628
+ - [#6189](https://github.com/ardatan/graphql-tools/pull/6189)
629
+ [`0134f7f`](https://github.com/ardatan/graphql-tools/commit/0134f7ffe5383603961d69337bfa5bceefb3ed74)
630
+ Thanks [@ardatan](https://github.com/ardatan)! - Handle interface types with non-shared
631
+ implementations;
632
+
633
+ For example, you have the following services, where `Node` is implemented in both services, but
634
+ `Foo` and `Bar` are only implemented in one service. And when the gateway receives the following
635
+ query, it should be converted to this because `Node` is not implemented as `Bar` in Service 1
636
+ while implemented in Service 2.
637
+
638
+ Query conversion;
639
+
640
+ ```graphql
641
+ # Gateway request
642
+ query {
643
+ fooBar(id: "1") {
644
+ ... on Node {
645
+ id
646
+ }
647
+ }
648
+ }
649
+ ```
650
+
651
+ ```graphql
652
+ # Service 1 Request
653
+ query {
654
+ fooBar(id: "1") {
655
+ ... on Foo {
656
+ id
657
+ }
658
+ ... on Bar {
659
+ id
660
+ }
661
+ }
662
+ }
663
+ ```
664
+
665
+ Services;
666
+
667
+ ```graphql
668
+ # Service 1
669
+
670
+ union FooBar = Foo | Bar
671
+
672
+ interface Node {
673
+ id: ID!
674
+ }
675
+
676
+ type Foo implements Node {
677
+ id: ID!
678
+ }
679
+
680
+ type Bar {
681
+ id: ID!
682
+ }
683
+
684
+ type Query {
685
+ fooBar(id: ID!): FooBar
686
+ }
687
+ ```
688
+
689
+ ```graphql
690
+ # Service 2
691
+ interface Node {
692
+ id: ID!
693
+ }
694
+
695
+ type Foo implements Node {
696
+ id: ID!
697
+ }
698
+
699
+ type Bar implements Node {
700
+ id: ID!
701
+ }
702
+ ```
703
+
704
+ - Updated dependencies
705
+ [[`7368829`](https://github.com/ardatan/graphql-tools/commit/73688291af0c8cb2fe550fe8c74fd8af84cb360f),
706
+ [`e10c13a`](https://github.com/ardatan/graphql-tools/commit/e10c13a60e344b9217dc77a7cac50ec447feda7e)]:
707
+ - @graphql-tools/schema@10.0.4
708
+ - @graphql-tools/utils@10.2.1
709
+
710
+ ## 10.0.10
711
+
712
+ ### Patch Changes
713
+
714
+ - [#6134](https://github.com/ardatan/graphql-tools/pull/6134)
715
+ [`a83da08`](https://github.com/ardatan/graphql-tools/commit/a83da087e24929ed0734a2cff63c97bd45cc9eb4)
716
+ Thanks [@User](https://github.com/User)! - Ignore unmerged fields
717
+
718
+ Let's say you have a gateway schema like in the bottom, and `id` is added to the query, only if
719
+ the `age` is requested;
720
+
721
+ ```graphql
722
+ # This will be sent as-is
723
+ {
724
+ user {
725
+ name
726
+ }
727
+ }
728
+ ```
729
+
730
+ But the following will be transformed;
731
+
732
+ ```graphql
733
+ {
734
+ user {
735
+ name
736
+ age
737
+ }
738
+ }
739
+ ```
740
+
741
+ Into
742
+
743
+ ````graphql
744
+ {
745
+ user {
746
+ id
747
+ name
748
+ age
749
+ }
750
+ }
751
+
752
+
753
+ ```graphql
754
+ type Query {
755
+
756
+ }
757
+
758
+ type User {
759
+ id: ID! # is the key for all services
760
+ name: String!
761
+ age: Int! # This comes from another service
762
+ }
763
+ ````
764
+
765
+ - [#6150](https://github.com/ardatan/graphql-tools/pull/6150)
766
+ [`fc9c71f`](https://github.com/ardatan/graphql-tools/commit/fc9c71fbc9057a8e32e0d8813b23819c631afa65)
767
+ Thanks [@ardatan](https://github.com/ardatan)! - If there are some fields depending on a nested
768
+ type resolution, wait until it gets resolved then resolve the rest.
769
+
770
+ See packages/federation/test/fixtures/complex-entity-call example for more details. You can see
771
+ `ProductList` needs some fields from `Product` to resolve `first`
772
+
773
+ ## 10.0.9
774
+
775
+ ### Patch Changes
776
+
777
+ - [#6126](https://github.com/ardatan/graphql-tools/pull/6126)
778
+ [`680351e`](https://github.com/ardatan/graphql-tools/commit/680351ee2af39ffd6b4b0048a28954d0d4b8a926)
779
+ Thanks [@ardatan](https://github.com/ardatan)! - When there is a Node subschema, and others to
780
+ resolve the rest of the entities by using a union resolver as in Federation like below, it was
781
+ failing. This version fixes that issue.
782
+
783
+ ```graphql
784
+ query {
785
+ node(id: "1") {
786
+ id # Fetches from Node
787
+ ... on User {
788
+ name # Fetches from User
789
+ }
790
+ }
791
+ }
792
+ ```
793
+
794
+ ```graphql
795
+ type Query {
796
+ node(id: ID!): Node
797
+ }
798
+
799
+ interface Node {
800
+ id: ID!
801
+ }
802
+
803
+ type User implements Node {
804
+ id: ID!
805
+ }
806
+
807
+ type Post implements Node {
808
+ id: ID!
809
+ }
810
+ ```
811
+
812
+ ```graphql
813
+ # User subschema
814
+ scalar _Any
815
+ type Query {
816
+ _entities(representations: [_Any!]!): [_Entity]!
817
+ }
818
+ union _Entity = User
819
+ interface Node {
820
+ id: ID!
821
+ }
822
+ type User implements Node {
823
+ id: ID!
824
+ name: String!
825
+ }
826
+ ```
827
+
828
+ ```graphql
829
+ # Post subschema
830
+ scalar _Any
831
+ union _Entity = Post
832
+ type Query {
833
+ _entities(representations: [_Any!]!): [_Entity]!
834
+ }
835
+ interface Node {
836
+ id: ID!
837
+ }
838
+ type Post implements Node {
839
+ id: ID!
840
+ title: String!
841
+ }
842
+ ```
843
+
844
+ ## 10.0.8
845
+
846
+ ### Patch Changes
847
+
848
+ - [`4ce3ffc`](https://github.com/ardatan/graphql-tools/commit/4ce3ffc8ec927651587e0aa236fdd573e883ef21)
849
+ Thanks [@ardatan](https://github.com/ardatan)! - Simplify the logic in `wrapConcreteTypes`
850
+
851
+ ## 10.0.7
852
+
853
+ ### Patch Changes
854
+
855
+ - [#6109](https://github.com/ardatan/graphql-tools/pull/6109)
856
+ [`074fad4`](https://github.com/ardatan/graphql-tools/commit/074fad4144095fbefe449ced397b7707963bd7aa)
857
+ Thanks [@ardatan](https://github.com/ardatan)! - Merge list fields correctly
858
+
859
+ ## 10.0.6
860
+
861
+ ### Patch Changes
862
+
863
+ - [`af7be09`](https://github.com/ardatan/graphql-tools/commit/af7be099e88777bba376c14ecf191365ed3a89c7)
864
+ Thanks [@ardatan](https://github.com/ardatan)! - Hotfix: do not use nullable and nonNullable
865
+ prefixes if field names don't match
866
+
867
+ ## 10.0.5
868
+
869
+ ### Patch Changes
870
+
871
+ - [#6091](https://github.com/ardatan/graphql-tools/pull/6091)
872
+ [`9bca9e0`](https://github.com/ardatan/graphql-tools/commit/9bca9e03915a2e12d164e355be9aed389b0de3a4)
873
+ Thanks [@User](https://github.com/User), [@User](https://github.com/User)! - If the gateway
874
+ receives a query with an overlapping fields for the subschema, it uses aliases to resolve it
875
+ correctly.
876
+
877
+ Let's say subschema A has the following schema;
878
+
879
+ ```graphql
880
+ type Query {
881
+
882
+ }
883
+
884
+ interface User {
885
+ id: ID!
886
+ name: String!
887
+ }
888
+
889
+ type Admin implements User {
890
+ id: ID!
891
+ name: String!
892
+ role: String!
893
+ }
894
+
895
+ type Customer implements User {
896
+ id: ID!
897
+ name: String
898
+ email: String
899
+ }
900
+ ```
901
+
902
+ And let's say the gateway has the following schema instead;
903
+
904
+ ```graphql
905
+ type Query {
906
+
907
+ }
908
+
909
+ interface User {
910
+ id: ID!
911
+ name: String!
912
+ }
913
+
914
+ type Admin implements User {
915
+ id: ID!
916
+ name: String!
917
+ role: String!
918
+ }
919
+
920
+ type Customer implements User {
921
+ id: ID!
922
+ name: String!
923
+ email: String!
924
+ }
925
+ ```
926
+
927
+ In this case, the following query is fine for the gateway but for the subschema, it's not;
928
+
929
+ ```graphql
930
+ query {
931
+ user {
932
+ ... on Admin {
933
+ id
934
+ name # This is nullable in the subschema
935
+ role
936
+ }
937
+ ... on Customer {
938
+ id
939
+ name # This is non-nullable in the subschema
940
+ email
941
+ }
942
+ }
943
+ }
944
+ ```
945
+
946
+ So the subgraph will throw based on this rule
947
+ [OverlappingFieldsCanBeMerged](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts)
948
+
949
+ To avoid this, the gateway will use aliases to resolve the query correctly. The query will be
950
+ transformed to the following;
951
+
952
+ ```graphql
953
+ query {
954
+ user {
955
+ ... on Admin {
956
+ id
957
+ name # This is nullable in the subschema
958
+ role
959
+ }
960
+ ... on Customer {
961
+ id
962
+ name: _nullable_name # This is non-nullable in the subschema
963
+ email
964
+ }
965
+ }
966
+ }
967
+ ```
968
+
969
+ - [#6092](https://github.com/ardatan/graphql-tools/pull/6092)
970
+ [`243c353`](https://github.com/ardatan/graphql-tools/commit/243c353412921cf0063f963ee46b9c63d2f33b41)
971
+ Thanks [@ardatan](https://github.com/ardatan)! - If one of the subgraphs are already able to
972
+ resolve a nested field as in `parent-entity-call` example's `Category.details` from C's `Product`,
973
+ resolve it from there instead of using type merging.
974
+
975
+ ```graphql
976
+ query {
977
+ product {
978
+ category {
979
+ details {
980
+ # This is coming from C's Product, so resolve it from there instead of Type Merging
981
+ id
982
+ name
983
+ }
984
+ }
985
+ }
986
+ }
987
+ ```
988
+
989
+ ## 10.0.4
990
+
991
+ ### Patch Changes
992
+
993
+ - [#5913](https://github.com/ardatan/graphql-tools/pull/5913)
994
+ [`83c0af0`](https://github.com/ardatan/graphql-tools/commit/83c0af0713ff2ce55ccfb97a1810ecfecfeab703)
995
+ Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
996
+
997
+ - Updated dependency
998
+ [`@graphql-tools/schema@^10.0.2` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.2)
999
+ (from `^10.0.0`, in `dependencies`)
1000
+ - Updated dependency
1001
+ [`@graphql-tools/utils@^10.0.13` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.0.13)
1002
+ (from `^10.0.5`, in `dependencies`)
1003
+
1004
+ - [#5913](https://github.com/ardatan/graphql-tools/pull/5913)
1005
+ [`83c0af0`](https://github.com/ardatan/graphql-tools/commit/83c0af0713ff2ce55ccfb97a1810ecfecfeab703)
1006
+ Thanks [@enisdenjo](https://github.com/enisdenjo)! - No unnecessary inline fragment spreads for
1007
+ union types
1008
+
1009
+ - Updated dependencies
1010
+ [[`83c0af0`](https://github.com/ardatan/graphql-tools/commit/83c0af0713ff2ce55ccfb97a1810ecfecfeab703),
1011
+ [`83c0af0`](https://github.com/ardatan/graphql-tools/commit/83c0af0713ff2ce55ccfb97a1810ecfecfeab703),
1012
+ [`83c0af0`](https://github.com/ardatan/graphql-tools/commit/83c0af0713ff2ce55ccfb97a1810ecfecfeab703)]:
1013
+ - @graphql-tools/batch-execute@9.0.4
1014
+ - @graphql-tools/executor@1.2.1
1015
+ - @graphql-tools/schema@10.0.3
1016
+
1017
+ ## 10.0.3
1018
+
1019
+ ### Patch Changes
1020
+
1021
+ - [#5572](https://github.com/ardatan/graphql-tools/pull/5572)
1022
+ [`aadb591f`](https://github.com/ardatan/graphql-tools/commit/aadb591f8cd99560d7adba3d66a193434425b47d)
1023
+ Thanks [@ardatan](https://github.com/ardatan)! - Fix for wrapping subscription types
1024
+
1025
+ ## 10.0.2
1026
+
1027
+ ### Patch Changes
1028
+
1029
+ - [#5477](https://github.com/ardatan/graphql-tools/pull/5477)
1030
+ [`cfd47827`](https://github.com/ardatan/graphql-tools/commit/cfd47827c0e625d1b1894e18260342576d6dd71d)
1031
+ Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
1032
+
1033
+ - Removed dependency
1034
+ [`value-or-promise@^1.0.12` ↗︎](https://www.npmjs.com/package/value-or-promise/v/1.0.12) (from
1035
+ `dependencies`)
1036
+
1037
+ - [`a59fb765`](https://github.com/ardatan/graphql-tools/commit/a59fb765a1256b914f1728283d793d61b66bdf89)
1038
+ Thanks [@ardatan](https://github.com/ardatan)! - Optimizations to get better performance in query
1039
+ planning
1040
+
1041
+ - Updated dependencies
1042
+ [[`a59fb765`](https://github.com/ardatan/graphql-tools/commit/a59fb765a1256b914f1728283d793d61b66bdf89)]:
1043
+ - @graphql-tools/batch-execute@9.0.1
1044
+ - @graphql-tools/utils@10.0.5
1045
+
1046
+ ## 10.0.1
1047
+
1048
+ ### Patch Changes
1049
+
1050
+ - [#5474](https://github.com/ardatan/graphql-tools/pull/5474)
1051
+ [`f31be313`](https://github.com/ardatan/graphql-tools/commit/f31be313b2af5a7c5bf893f1ce1dc7d36bf5340c)
1052
+ Thanks [@ardatan](https://github.com/ardatan)! - Optimizations for federation
1053
+
1054
+ ## 10.0.0
1055
+
1056
+ ### Major Changes
1057
+
1058
+ - [#5274](https://github.com/ardatan/graphql-tools/pull/5274)
1059
+ [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955)
1060
+ Thanks [@ardatan](https://github.com/ardatan)! - Drop Node 14 support. Require Node.js `>= 16`
1061
+
1062
+ ### Patch Changes
1063
+
1064
+ - [`8fba6cc1`](https://github.com/ardatan/graphql-tools/commit/8fba6cc1876e914d587f5b253332aaedbcaa65e6)
1065
+ Thanks [@ardatan](https://github.com/ardatan)! - Workaround for empty results
1066
+
1067
+ - Updated dependencies
1068
+ [[`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955),
1069
+ [`944a68e8`](https://github.com/ardatan/graphql-tools/commit/944a68e8becf9c86b4c97fd17c372d98a285b955)]:
1070
+ - @graphql-tools/batch-execute@9.0.0
1071
+ - @graphql-tools/executor@1.0.0
1072
+ - @graphql-tools/schema@10.0.0
1073
+ - @graphql-tools/utils@10.0.0
1074
+
1075
+ ## 9.0.35
1076
+
1077
+ ### Patch Changes
1078
+
1079
+ - [#5220](https://github.com/ardatan/graphql-tools/pull/5220)
1080
+ [`8e80b689`](https://github.com/ardatan/graphql-tools/commit/8e80b6893d2342353731610d5da9db633d806083)
1081
+ Thanks [@ardatan](https://github.com/ardatan)! - Performance improvements
1082
+
1083
+ - Updated dependencies
1084
+ [[`88244048`](https://github.com/ardatan/graphql-tools/commit/882440487551abcb5bdd4f626f3b56ac2e886f11),
1085
+ [`8e80b689`](https://github.com/ardatan/graphql-tools/commit/8e80b6893d2342353731610d5da9db633d806083)]:
1086
+ - @graphql-tools/executor@0.0.20
1087
+ - @graphql-tools/batch-execute@8.5.22
1088
+
1089
+ ## 9.0.34
1090
+
1091
+ ### Patch Changes
1092
+
1093
+ - [`2f342e43`](https://github.com/ardatan/graphql-tools/commit/2f342e430ba0d0097d1d8cb31a6abb97ed46f971)
1094
+ Thanks [@ardatan](https://github.com/ardatan)! - Do not use promises if not async
1095
+
1096
+ - Updated dependencies
1097
+ [[`2f342e43`](https://github.com/ardatan/graphql-tools/commit/2f342e430ba0d0097d1d8cb31a6abb97ed46f971)]:
1098
+ - @graphql-tools/batch-execute@8.5.21
1099
+
1100
+ ## 9.0.33
1101
+
1102
+ ### Patch Changes
1103
+
1104
+ - Updated dependencies
1105
+ [[`05c97eb8`](https://github.com/ardatan/graphql-tools/commit/05c97eb888cd4b1ffbd9adb32722cd5b609292a0),
1106
+ [`05c97eb8`](https://github.com/ardatan/graphql-tools/commit/05c97eb888cd4b1ffbd9adb32722cd5b609292a0),
1107
+ [`05c97eb8`](https://github.com/ardatan/graphql-tools/commit/05c97eb888cd4b1ffbd9adb32722cd5b609292a0),
1108
+ [`f24f018a`](https://github.com/ardatan/graphql-tools/commit/f24f018aa94394766f4201b1964d473d08946bd3)]:
1109
+ - @graphql-tools/batch-execute@8.5.20
1110
+ - @graphql-tools/executor@0.0.19
1111
+ - @graphql-tools/schema@9.0.19
1112
+
1113
+ ## 9.0.32
1114
+
1115
+ ### Patch Changes
1116
+
1117
+ - Updated dependencies
1118
+ [[`91a895be`](https://github.com/ardatan/graphql-tools/commit/91a895bea32dc4226da08e8981ded3f55f4c53f3)]:
1119
+ - @graphql-tools/executor@0.0.18
1120
+
1121
+ ## 9.0.31
1122
+
1123
+ ### Patch Changes
1124
+
1125
+ - Updated dependencies
1126
+ [[`1c95368a`](https://github.com/ardatan/graphql-tools/commit/1c95368aea868be537d956ba5e994cde58dfee41)]:
1127
+ - @graphql-tools/batch-execute@8.5.19
1128
+ - @graphql-tools/executor@0.0.17
1129
+ - @graphql-tools/schema@9.0.18
1130
+
1131
+ ## 9.0.30
1132
+
1133
+ ### Patch Changes
1134
+
1135
+ - Updated dependencies
1136
+ [[`828fbf93`](https://github.com/ardatan/graphql-tools/commit/828fbf93ff317d00577c9a94402736bac5f4be39)]:
1137
+ - @graphql-tools/executor@0.0.16
1138
+
1139
+ ## 9.0.29
1140
+
1141
+ ### Patch Changes
1142
+
1143
+ - [#5131](https://github.com/ardatan/graphql-tools/pull/5131)
1144
+ [`f26392a6`](https://github.com/ardatan/graphql-tools/commit/f26392a66299956da1e66253b181f85332c93db5)
1145
+ Thanks [@neumark](https://github.com/neumark)! - Create symbols with Symbol.for() because multiple
1146
+ copies of delegate cause stitching bugs otherwise.
1147
+
1148
+ ## 9.0.28
1149
+
1150
+ ### Patch Changes
1151
+
1152
+ - [#5067](https://github.com/ardatan/graphql-tools/pull/5067)
1153
+ [`492220cb`](https://github.com/ardatan/graphql-tools/commit/492220cbdf240e7abde23af0aabcb8cbc6fd3656)
1154
+ Thanks [@n1ru4l](https://github.com/n1ru4l)! - dependencies updates:
1155
+ - Updated dependency
1156
+ [`@graphql-tools/batch-execute@^8.5.18` ↗︎](https://www.npmjs.com/package/@graphql-tools/batch-execute/v/8.5.18)
1157
+ (from `8.5.18`, in `dependencies`)
1158
+ - Updated dependency
1159
+ [`@graphql-tools/executor@^0.0.14` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/0.0.14)
1160
+ (from `0.0.14`, in `dependencies`)
1161
+ - Updated dependency
1162
+ [`@graphql-tools/schema@^9.0.16` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/9.0.16)
1163
+ (from `9.0.16`, in `dependencies`)
1164
+ - Updated dependency
1165
+ [`@graphql-tools/utils@^9.2.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/9.2.1)
1166
+ (from `9.2.1`, in `dependencies`)
1167
+ - Updated dependency [`dataloader@^2.2.2` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.2)
1168
+ (from `2.2.2`, in `dependencies`)
1169
+ - Updated dependency [`tslib@^2.5.0` ↗︎](https://www.npmjs.com/package/tslib/v/2.5.0) (from
1170
+ `~2.5.0`, in `dependencies`)
1171
+ - Updated dependency
1172
+ [`value-or-promise@^1.0.12` ↗︎](https://www.npmjs.com/package/value-or-promise/v/1.0.12) (from
1173
+ `1.0.12`, in `dependencies`)
1174
+ - Updated dependencies
1175
+ [[`77c1002e`](https://github.com/ardatan/graphql-tools/commit/77c1002e2165a913508fb505513f9289db4f8cd3)]:
1176
+ - @graphql-tools/executor@0.0.15
1177
+
1178
+ ## 9.0.27
1179
+
1180
+ ### Patch Changes
1181
+
1182
+ - [#5055](https://github.com/ardatan/graphql-tools/pull/5055)
1183
+ [`30bd4d0c`](https://github.com/ardatan/graphql-tools/commit/30bd4d0c10f59147faba925dc0941c731b0532a9)
1184
+ Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
1185
+ - Updated dependency [`dataloader@2.2.2` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.2)
1186
+ (from `2.2.1`, in `dependencies`)
1187
+ - Updated dependencies
1188
+ [[`30bd4d0c`](https://github.com/ardatan/graphql-tools/commit/30bd4d0c10f59147faba925dc0941c731b0532a9)]:
1189
+ - @graphql-tools/batch-execute@8.5.18
1190
+
1191
+ ## 9.0.26
1192
+
1193
+ ### Patch Changes
1194
+
1195
+ - [#5025](https://github.com/ardatan/graphql-tools/pull/5025)
1196
+ [`b09ea282`](https://github.com/ardatan/graphql-tools/commit/b09ea282f0945fb19f354af57aabddcd23b2a155)
1197
+ Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
1198
+ - Updated dependency [`dataloader@2.2.1` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.1)
1199
+ (from `2.1.0`, in `dependencies`)
1200
+ - Updated dependencies
1201
+ [[`b09ea282`](https://github.com/ardatan/graphql-tools/commit/b09ea282f0945fb19f354af57aabddcd23b2a155),
1202
+ [`b5c8f640`](https://github.com/ardatan/graphql-tools/commit/b5c8f6407b74466ed0d2989000458cb59239e9af)]:
1203
+ - @graphql-tools/batch-execute@8.5.17
1204
+ - @graphql-tools/utils@9.2.1
1205
+ - @graphql-tools/executor@0.0.14
1206
+ - @graphql-tools/schema@9.0.16
1207
+
1208
+ ## 9.0.25
1209
+
1210
+ ### Patch Changes
1211
+
1212
+ - Updated dependencies
1213
+ [[`a94217e9`](https://github.com/ardatan/graphql-tools/commit/a94217e920c5d6237471ab6ad4d96cf230984177),
1214
+ [`62d074be`](https://github.com/ardatan/graphql-tools/commit/62d074be48779b1e096e056ca1233822c421dc99)]:
1215
+ - @graphql-tools/utils@9.2.0
1216
+ - @graphql-tools/batch-execute@8.5.16
1217
+ - @graphql-tools/executor@0.0.13
1218
+ - @graphql-tools/schema@9.0.15
1219
+
1220
+ ## 9.0.24
1221
+
1222
+ ### Patch Changes
1223
+
1224
+ - [#4995](https://github.com/ardatan/graphql-tools/pull/4995)
1225
+ [`772b948a`](https://github.com/ardatan/graphql-tools/commit/772b948ae536ac23520e704b33f450c94252f113)
1226
+ Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
1227
+ - Updated dependency [`tslib@~2.5.0` ↗︎](https://www.npmjs.com/package/tslib/v/2.5.0) (from
1228
+ `~2.4.0`, in `dependencies`)
1229
+
1230
+ ## 9.0.23
1231
+
1232
+ ### Patch Changes
1233
+
1234
+ - Updated dependencies []:
1235
+ - @graphql-tools/schema@9.0.14
1236
+
1237
+ ## 9.0.22
1238
+
1239
+ ### Patch Changes
1240
+
1241
+ - [#4943](https://github.com/ardatan/graphql-tools/pull/4943)
1242
+ [`a4d36fcc`](https://github.com/ardatan/graphql-tools/commit/a4d36fccce6113843a55b77c96328727f4c748bc)
1243
+ Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
1244
+ - Updated dependency
1245
+ [`value-or-promise@1.0.12` ↗︎](https://www.npmjs.com/package/value-or-promise/v/1.0.12) (from
1246
+ `1.0.11`, in `dependencies`)
1247
+ - Updated dependencies
1248
+ [[`a4d36fcc`](https://github.com/ardatan/graphql-tools/commit/a4d36fccce6113843a55b77c96328727f4c748bc),
1249
+ [`a4d36fcc`](https://github.com/ardatan/graphql-tools/commit/a4d36fccce6113843a55b77c96328727f4c748bc),
1250
+ [`a4d36fcc`](https://github.com/ardatan/graphql-tools/commit/a4d36fccce6113843a55b77c96328727f4c748bc),
1251
+ [`e3ec35ed`](https://github.com/ardatan/graphql-tools/commit/e3ec35ed27d4a329739c8da6be06ce74c8f25591)]:
1252
+ - @graphql-tools/batch-execute@8.5.15
1253
+ - @graphql-tools/executor@0.0.12
1254
+ - @graphql-tools/schema@9.0.13
1255
+ - @graphql-tools/utils@9.1.4
1256
+
1257
+ ## 9.0.21
1258
+
1259
+ ### Patch Changes
1260
+
1261
+ - [#4920](https://github.com/ardatan/graphql-tools/pull/4920)
1262
+ [`13177794`](https://github.com/ardatan/graphql-tools/commit/131777947d111e6a952d9e0e581fd651664101a1)
1263
+ Thanks [@ardatan](https://github.com/ardatan)! - Handle type merging with union types correctly ->
1264
+ See https://github.com/ardatan/graphql-tools/issues/4902
1265
+
1266
+ ## 9.0.20
1267
+
1268
+ ### Patch Changes
1269
+
1270
+ - [#4890](https://github.com/ardatan/graphql-tools/pull/4890)
1271
+ [`eb6cd8b6`](https://github.com/ardatan/graphql-tools/commit/eb6cd8b65dc72434348c259538b233e57a58eb1a)
1272
+ Thanks [@ardatan](https://github.com/ardatan)! - Transform provided argument values properly
1273
+
1274
+ - [#4890](https://github.com/ardatan/graphql-tools/pull/4890)
1275
+ [`eb6cd8b6`](https://github.com/ardatan/graphql-tools/commit/eb6cd8b65dc72434348c259538b233e57a58eb1a)
1276
+ Thanks [@ardatan](https://github.com/ardatan)! - Handle argument definitions correctly during
1277
+ delegation and transformations
1278
+
1279
+ ## 9.0.19
1280
+
1281
+ ### Patch Changes
1282
+
1283
+ - [#4887](https://github.com/ardatan/graphql-tools/pull/4887)
1284
+ [`904fe770`](https://github.com/ardatan/graphql-tools/commit/904fe770a355ee3d79464c3bbf0375d2dcd64759)
1285
+ Thanks [@ardatan](https://github.com/ardatan)! - Fix handling variables
1286
+
1287
+ - Updated dependencies
1288
+ [[`904fe770`](https://github.com/ardatan/graphql-tools/commit/904fe770a355ee3d79464c3bbf0375d2dcd64759)]:
1289
+ - @graphql-tools/utils@9.1.3
1290
+ - @graphql-tools/batch-execute@8.5.14
1291
+ - @graphql-tools/executor@0.0.11
1292
+ - @graphql-tools/schema@9.0.12
1293
+
1294
+ ## 9.0.18
1295
+
1296
+ ### Patch Changes
1297
+
1298
+ - [`13c24883`](https://github.com/ardatan/graphql-tools/commit/13c24883004d5330f7402cb20566e37535c5729b)
1299
+ Thanks [@ardatan](https://github.com/ardatan)! - Fix handling argument values in gateway request
1300
+
1301
+ - [`b5e6459f`](https://github.com/ardatan/graphql-tools/commit/b5e6459f87cd8720457ce9bff38f3dfa0cb3c150)
1302
+ Thanks [@ardatan](https://github.com/ardatan)! - Show warning only if DEBUG env var is present
1303
+
1304
+ - Updated dependencies
1305
+ [[`13c24883`](https://github.com/ardatan/graphql-tools/commit/13c24883004d5330f7402cb20566e37535c5729b)]:
1306
+ - @graphql-tools/utils@9.1.2
1307
+ - @graphql-tools/batch-execute@8.5.13
1308
+ - @graphql-tools/executor@0.0.10
1309
+ - @graphql-tools/schema@9.0.11
1310
+
1311
+ ## 9.0.17
1312
+
1313
+ ### Patch Changes
1314
+
1315
+ - Updated dependencies
1316
+ [[`7411a5e7`](https://github.com/ardatan/graphql-tools/commit/7411a5e71a8138d9ccfe907b1fb01e62fcbb0cdb)]:
1317
+ - @graphql-tools/utils@9.1.1
1318
+ - @graphql-tools/batch-execute@8.5.12
1319
+ - @graphql-tools/executor@0.0.9
1320
+ - @graphql-tools/schema@9.0.10
1321
+
1322
+ ## 9.0.16
1323
+
1324
+ ### Patch Changes
1325
+
1326
+ - Updated dependencies
1327
+ [[`1d3856dc`](https://github.com/ardatan/graphql-tools/commit/1d3856dccaaafe2da96c91dd38dcce356bc734a3)]:
1328
+ - @graphql-tools/executor@0.0.8
1329
+
1330
+ ## 9.0.15
1331
+
1332
+ ### Patch Changes
1333
+
1334
+ - Updated dependencies
1335
+ [[`c0639dd0`](https://github.com/ardatan/graphql-tools/commit/c0639dd0065db1b5bcedaabf58b11945714bab8d)]:
1336
+ - @graphql-tools/utils@9.1.0
1337
+ - @graphql-tools/batch-execute@8.5.11
1338
+ - @graphql-tools/executor@0.0.7
1339
+ - @graphql-tools/schema@9.0.9
1340
+
1341
+ ## 9.0.14
1342
+
1343
+ ### Patch Changes
1344
+
1345
+ - Updated dependencies
1346
+ [[`d83b1960`](https://github.com/ardatan/graphql-tools/commit/d83b19605be71481ccf8effd80d5254423ea811a)]:
1347
+ - @graphql-tools/utils@9.0.1
1348
+ - @graphql-tools/batch-execute@8.5.10
1349
+ - @graphql-tools/executor@0.0.6
1350
+ - @graphql-tools/schema@9.0.8
1351
+
1352
+ ## 9.0.13
1353
+
1354
+ ### Patch Changes
1355
+
1356
+ - Updated dependencies
1357
+ [[`79e5554b`](https://github.com/ardatan/graphql-tools/commit/79e5554b524d1404f70c932cb43bdd55869ddfff),
1358
+ [`185f1e97`](https://github.com/ardatan/graphql-tools/commit/185f1e9738fbd53a894948d769e827a6e9e0ff60)]:
1359
+ - @graphql-tools/executor@0.0.5
1360
+
1361
+ ## 9.0.12
1362
+
1363
+ ### Patch Changes
1364
+
1365
+ - Updated dependencies
1366
+ [[`f47f3559`](https://github.com/ardatan/graphql-tools/commit/f47f35593d4e5b785359f4d5dbdb2981156fecba)]:
1367
+ - @graphql-tools/executor@0.0.4
1368
+
1369
+ ## 9.0.11
1370
+
1371
+ ### Patch Changes
1372
+
1373
+ - [#4796](https://github.com/ardatan/graphql-tools/pull/4796)
1374
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931)
1375
+ Thanks [@saihaj](https://github.com/saihaj)! - update `collectFields` to support collecting
1376
+ deffered values
1377
+
1378
+ - Updated dependencies
1379
+ [[`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931),
1380
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931),
1381
+ [`8f6d3efc`](https://github.com/ardatan/graphql-tools/commit/8f6d3efc92b25236f5a3a761ea7ba2f0a7c7f550),
1382
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931),
1383
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931),
1384
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931),
1385
+ [`80836fa7`](https://github.com/ardatan/graphql-tools/commit/80836fa78af3c6e61c61fe4d3bc52831b2c58931)]:
1386
+ - @graphql-tools/executor@0.0.3
1387
+ - @graphql-tools/utils@9.0.0
1388
+ - @graphql-tools/batch-execute@8.5.9
1389
+ - @graphql-tools/schema@9.0.7
1390
+
1391
+ ## 9.0.10
1392
+
1393
+ ### Patch Changes
1394
+
1395
+ - Updated dependencies
1396
+ [[`f7daf777`](https://github.com/ardatan/graphql-tools/commit/f7daf7777cc214801886e4a45c0389bc5837d175)]:
1397
+ - @graphql-tools/utils@8.13.1
1398
+ - @graphql-tools/batch-execute@8.5.8
1399
+ - @graphql-tools/executor@0.0.2
1400
+ - @graphql-tools/schema@9.0.6
1401
+
1402
+ ## 9.0.9
1403
+
1404
+ ### Patch Changes
1405
+
1406
+ - [#4778](https://github.com/ardatan/graphql-tools/pull/4778)
1407
+ [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f)
1408
+ Thanks [@saihaj](https://github.com/saihaj)! - dependencies updates:
1409
+ - Added dependency
1410
+ [`@graphql-tools/executor@0.0.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/0.0.0)
1411
+ (to `dependencies`)
1412
+ - Updated dependencies
1413
+ [[`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f),
1414
+ [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f),
1415
+ [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f),
1416
+ [`df5848b8`](https://github.com/ardatan/graphql-tools/commit/df5848b85102827f004f23aded7cf802cdcde00f)]:
1417
+ - @graphql-tools/utils@8.13.0
1418
+ - @graphql-tools/executor@0.0.1
1419
+ - @graphql-tools/batch-execute@8.5.7
1420
+ - @graphql-tools/schema@9.0.5
1421
+
1422
+ ## 9.0.8
1423
+
1424
+ ### Patch Changes
1425
+
1426
+ - [`0402894d`](https://github.com/ardatan/graphql-tools/commit/0402894d0b2747ae5d98d28df9b39d6a06cc5f2a)
1427
+ Thanks [@ardatan](https://github.com/ardatan)! - Refactor resolveExternalValue
1428
+
1429
+ ## 9.0.7
1430
+
1431
+ ### Patch Changes
1432
+
1433
+ - [`00c4a1a4`](https://github.com/ardatan/graphql-tools/commit/00c4a1a44e14b9950f44d56f44967ab7a0121706)
1434
+ Thanks [@ardatan](https://github.com/ardatan)! - If type is a list but the provided value isn't,
1435
+ do not fail and resolve that value as the member of that list type
1436
+
1437
+ ## 9.0.6
1438
+
1439
+ ### Patch Changes
1440
+
1441
+ - Updated dependencies
1442
+ [[`43c736bd`](https://github.com/ardatan/graphql-tools/commit/43c736bd1865c00898966a7ed14060496c9e6a0c)]:
1443
+ - @graphql-tools/utils@8.12.0
1444
+ - @graphql-tools/batch-execute@8.5.6
1445
+ - @graphql-tools/schema@9.0.4
1446
+
1447
+ ## 9.0.5
1448
+
1449
+ ### Patch Changes
1450
+
1451
+ - Updated dependencies
1452
+ [[`71cb4fae`](https://github.com/ardatan/graphql-tools/commit/71cb4faeb0833a228520a7bc2beed8ac7274443f),
1453
+ [`403ed450`](https://github.com/ardatan/graphql-tools/commit/403ed4507eff7cd509f410f7542a702da72e1a9a)]:
1454
+ - @graphql-tools/utils@8.11.0
1455
+ - @graphql-tools/batch-execute@8.5.5
1456
+ - @graphql-tools/schema@9.0.3
1457
+
1458
+ ## 9.0.4
1459
+
1460
+ ### Patch Changes
1461
+
1462
+ - Updated dependencies
1463
+ [[`4fe3d9c0`](https://github.com/ardatan/graphql-tools/commit/4fe3d9c037e9c138bd8a9b04b3977d74eba32c97)]:
1464
+ - @graphql-tools/utils@8.10.1
1465
+ - @graphql-tools/batch-execute@8.5.4
1466
+ - @graphql-tools/schema@9.0.2
1467
+
1468
+ ## 9.0.3
1469
+
1470
+ ### Patch Changes
1471
+
1472
+ - [`0555a972`](https://github.com/ardatan/graphql-tools/commit/0555a972f010d2b3ca93b9164b26474a78d0b20b)
1473
+ Thanks [@ardatan](https://github.com/ardatan)! - Bump versions
1474
+
1475
+ ## 9.0.2
1476
+
1477
+ ### Patch Changes
1478
+
1479
+ - [#4648](https://github.com/ardatan/graphql-tools/pull/4648)
1480
+ [`29ee7542`](https://github.com/ardatan/graphql-tools/commit/29ee7542649e9c938bdb9c751bd3a2f56d17cb55)
1481
+ Thanks [@ardatan](https://github.com/ardatan)! - Do not call `Transform.transformSchema` more than
1482
+ once
1483
+
1484
+ ## 9.0.1
1485
+
1486
+ ### Patch Changes
1487
+
1488
+ - Updated dependencies
1489
+ [[`2609d71f`](https://github.com/ardatan/graphql-tools/commit/2609d71f7c3a0ef2b381c51d9ce60b0de49f9b27)]:
1490
+ - @graphql-tools/utils@8.10.0
1491
+ - @graphql-tools/schema@9.0.1
1492
+ - @graphql-tools/batch-execute@8.5.3
1493
+
1494
+ ## 9.0.0
1495
+
1496
+ ### Major Changes
1497
+
1498
+ - [#4566](https://github.com/ardatan/graphql-tools/pull/4566)
1499
+ [`d8dc67aa`](https://github.com/ardatan/graphql-tools/commit/d8dc67aa6cb05bf10f5f16e90690e5ccc87b3426)
1500
+ Thanks [@ardatan](https://github.com/ardatan)! - ## Breaking changes
1501
+
1502
+ **Schema generation optimization by removing `transfomedSchema` parameter**
1503
+
1504
+ Previously we were applying the transforms multiple times. We needed to introduced some breaking
1505
+ changes to improve the initial wrapped/stitched schema generation performance;
1506
+
1507
+ - `Transform.transformSchema` no longer accepts `transformedSchema` which can easily be created
1508
+ with `applySchemaTransforms(schema, subschemaConfig)` instead.
1509
+ - Proxying resolver factory function that is passed as `createProxyingResolver` to
1510
+ `SubschemaConfig` no longer takes `transformedSchema` which can easily be created with
1511
+ `applySchemaTransforms(schema, subschemaConfig)` instead.
1512
+
1513
+ **`stitchSchemas` doesn't take nested arrays of subschemas**
1514
+
1515
+ `stitchSchemas` no longer accepts an array of arrays of subschema configuration objects. Instead,
1516
+ it accepts an array of subschema configuration objects or schema objects directly.
1517
+
1518
+ **`stitchSchemas` no longer prunes the schema with `pruningOptions`**
1519
+
1520
+ You can use `pruneSchema` from `@graphql-tools/utils` to prune the schema instead.
1521
+
1522
+ **`stitchSchemas` no longer respect "@computed" directive if stitchingDirectivesTransformer isn't
1523
+ applied**
1524
+
1525
+ Also `@graphql-tools/stitch` no longer exports `computedDirectiveTransformer` and
1526
+ `defaultSubschemaConfigTransforms`. Instead, use `@graphql-tools/stitching-directives` package for
1527
+ `@computed` directive.
1528
+ [Learn more about setting it up](https://www.graphql-tools.com/docs/schema-stitching/stitch-directives-sdl#directives-glossary)
1529
+
1530
+ **`computedFields` has been removed from the merged type configuration**
1531
+
1532
+ `MergeTypeConfig.computedFields` setting has been removed in favor of new computed field
1533
+ configuration written as:
1534
+
1535
+ ```js
1536
+ merge: {
1537
+ MyType: {
1538
+ fields: {
1539
+ myComputedField: {
1540
+ selectionSet: '{ weight }',
1541
+ computed: true,
1542
+ }
1543
+ }
1544
+ }
1545
+ }
1546
+ ```
1547
+
1548
+ A field-level `selectionSet` specifies field dependencies while the `computed` setting structures
1549
+ the field in a way that assures it is always selected with this data provided. The `selectionSet`
1550
+ is intentionally generic to support possible future uses. This new pattern organizes all
1551
+ field-level configuration (including `canonical`) into a single structure.
1552
+
1553
+ ### Patch Changes
1554
+
1555
+ - [#4624](https://github.com/ardatan/graphql-tools/pull/4624)
1556
+ [`e3167edc`](https://github.com/ardatan/graphql-tools/commit/e3167edc98172fda88ce2306c10c7d4a23d91d67)
1557
+ Thanks [@n1ru4l](https://github.com/n1ru4l)! - Fix CommonJS TypeScript resolution with
1558
+ `moduleResolution` `node16` or `nodenext`
1559
+
1560
+ - Updated dependencies
1561
+ [[`8cc8721f`](https://github.com/ardatan/graphql-tools/commit/8cc8721fbbff3c978fd67d162df833d6973c1860),
1562
+ [`e3167edc`](https://github.com/ardatan/graphql-tools/commit/e3167edc98172fda88ce2306c10c7d4a23d91d67)]:
1563
+ - @graphql-tools/schema@9.0.0
1564
+ - @graphql-tools/batch-execute@8.5.2
1565
+ - @graphql-tools/utils@8.9.1
1566
+
1567
+ ## 8.8.1
1568
+
1569
+ ### Patch Changes
1570
+
1571
+ - Updated dependencies [2a3b45e3]
1572
+ - @graphql-tools/utils@8.9.0
1573
+ - @graphql-tools/batch-execute@8.5.1
1574
+ - @graphql-tools/schema@8.5.1
1575
+
1576
+ ## 8.8.0
1577
+
1578
+ ### Minor Changes
1579
+
1580
+ - d76a299c: Support TypeScript module resolution.
1581
+
1582
+ ### Patch Changes
1583
+
1584
+ - Updated dependencies [a0abbbcd]
1585
+ - Updated dependencies [d76a299c]
1586
+ - @graphql-tools/utils@8.8.0
1587
+ - @graphql-tools/batch-execute@8.5.0
1588
+ - @graphql-tools/schema@8.5.0
1589
+
1590
+ ## 8.7.12
1591
+
1592
+ ### Patch Changes
1593
+
1594
+ - 6df204de: Remove graphql-executor to have smaller bundle size
1595
+ - Updated dependencies [4914970b]
1596
+ - @graphql-tools/schema@8.4.0
1597
+ - @graphql-tools/utils@8.7.0
1598
+ - @graphql-tools/batch-execute@8.4.11
1599
+
1600
+ ## 8.7.11
1601
+
1602
+ ### Patch Changes
1603
+
1604
+ - 041c5ba1: Use caret range for the tslib dependency
1605
+ - Updated dependencies [041c5ba1]
1606
+ - @graphql-tools/batch-execute@8.4.10
1607
+ - @graphql-tools/schema@8.3.14
1608
+ - @graphql-tools/utils@8.6.13
1609
+
1610
+ ## 8.7.10
1611
+
1612
+ ### Patch Changes
1613
+
1614
+ - Updated dependencies [da7ad43b]
1615
+ - @graphql-tools/utils@8.6.12
1616
+ - @graphql-tools/batch-execute@8.4.9
1617
+ - @graphql-tools/schema@8.3.13
1618
+
1619
+ ## 8.7.9
1620
+
1621
+ ### Patch Changes
1622
+
1623
+ - Updated dependencies [c0762ee3]
1624
+ - @graphql-tools/utils@8.6.11
1625
+ - @graphql-tools/batch-execute@8.4.8
1626
+ - @graphql-tools/schema@8.3.12
1627
+
1628
+ ## 8.7.8
1629
+
1630
+ ### Patch Changes
1631
+
1632
+ - Updated dependencies [0fc510cb]
1633
+ - @graphql-tools/utils@8.6.10
1634
+ - @graphql-tools/batch-execute@8.4.7
1635
+ - @graphql-tools/schema@8.3.11
1636
+
1637
+ ## 8.7.7
1638
+
1639
+ ### Patch Changes
1640
+
1641
+ - Updated dependencies [31a33e2b]
1642
+ - @graphql-tools/utils@8.6.9
1643
+ - @graphql-tools/batch-execute@8.4.6
1644
+ - @graphql-tools/schema@8.3.10
1645
+
1646
+ ## 8.7.6
1647
+
1648
+ ### Patch Changes
1649
+
1650
+ - 26e4b464: relax subschema error path check
1651
+
1652
+ ...as (apparently) some implementations may return path as `null` rather than not returning a
1653
+ path.
1654
+
1655
+ ## 8.7.5
1656
+
1657
+ ### Patch Changes
1658
+
1659
+ - Updated dependencies [cb238877]
1660
+ - @graphql-tools/utils@8.6.8
1661
+ - @graphql-tools/batch-execute@8.4.5
1662
+ - @graphql-tools/schema@8.3.9
1663
+
1664
+ ## 8.7.4
1665
+
1666
+ ### Patch Changes
1667
+
1668
+ - 0bbb1769: Refine generic typings using `extends X` when appropriate
1669
+
1670
+ Typescript 4.7 has stricter requirements around generics which is explained well in the related
1671
+ PR: https://github.com/microsoft/TypeScript/pull/48366
1672
+
1673
+ These changes resolve the errors that these packages will face when attempting to upgrade to TS
1674
+ 4.7 (still in beta at the time of writing this). Landing these changes now will allow other TS
1675
+ libraries which depend on these packages to experiment with TS 4.7 in the meantime.
1676
+
1677
+ - Updated dependencies [0bbb1769]
1678
+ - @graphql-tools/utils@8.6.7
1679
+ - @graphql-tools/batch-execute@8.4.4
1680
+ - @graphql-tools/schema@8.3.8
1681
+
1682
+ ## 8.7.3
1683
+
1684
+ ### Patch Changes
1685
+
1686
+ - fe9402af: Bump data-loader and cross-undici-fetch
1687
+ - Updated dependencies [fe9402af]
1688
+ - @graphql-tools/batch-execute@8.4.3
1689
+
1690
+ ## 8.7.2
1691
+
1692
+ ### Patch Changes
1693
+
1694
+ - Updated dependencies [904c0847]
1695
+ - @graphql-tools/utils@8.6.6
1696
+ - @graphql-tools/batch-execute@8.4.2
1697
+ - @graphql-tools/schema@8.3.7
1698
+
1699
+ ## 8.7.1
1700
+
1701
+ ### Patch Changes
1702
+
1703
+ - Updated dependencies [722abad7]
1704
+ - @graphql-tools/schema@8.3.6
1705
+
1706
+ ## 8.7.0
1707
+
1708
+ ### Minor Changes
1709
+
1710
+ - d8fd6b94: enhance(delegate): use graphql-executor for subscriptions
1711
+
1712
+ ## 8.6.1
1713
+
1714
+ ### Patch Changes
1715
+
1716
+ - Updated dependencies [be2c02d7]
1717
+ - @graphql-tools/utils@8.6.5
1718
+ - @graphql-tools/batch-execute@8.4.1
1719
+ - @graphql-tools/schema@8.3.5
1720
+
1721
+ ## 8.6.0
1722
+
1723
+ ### Minor Changes
1724
+
1725
+ - c40e801f: feat: forward gateway operation's name to subschema executors
1726
+
1727
+ ### Patch Changes
1728
+
1729
+ - Updated dependencies [c40e801f]
1730
+ - Updated dependencies [d36d530b]
1731
+ - @graphql-tools/batch-execute@8.4.0
1732
+ - @graphql-tools/utils@8.6.4
1733
+ - @graphql-tools/schema@8.3.4
1734
+
1735
+ ## 8.5.4
1736
+
1737
+ ### Patch Changes
1738
+
1739
+ - 0c0c6857: fix - align versions
1740
+ - Updated dependencies [0c0c6857]
1741
+ - @graphql-tools/batch-execute@8.3.3
1742
+ - @graphql-tools/schema@8.3.3
1743
+
1744
+ ## 8.5.3
1745
+
1746
+ ### Patch Changes
1747
+
1748
+ - 70081f8f: enhance(delegate): type is now inferred from the transformed subschema instead of
1749
+ unified schema
1750
+ - 70081f8f: enhance(stitch): support promises in key functions
1751
+
1752
+ ## 8.5.2
1753
+
1754
+ ### Patch Changes
1755
+
1756
+ - b84a7809: fix(delegate): do not resolve the type twice
1757
+
1758
+ ## 8.5.1
1759
+
1760
+ ### Patch Changes
1761
+
1762
+ - 18341363: feat(visitResult): ignore if field not present in visited object
1763
+ - Updated dependencies [18341363]
1764
+ - @graphql-tools/batch-execute@8.3.2
1765
+ - @graphql-tools/schema@8.3.2
1766
+ - @graphql-tools/utils@8.6.2
1767
+
1768
+ ## 8.5.0
1769
+
1770
+ ### Minor Changes
1771
+
1772
+ - 081b97e8: Add better type support for stitchSchemas using subschema transformations
1773
+
1774
+ ## 8.4.3
1775
+
1776
+ ### Patch Changes
1777
+
1778
+ - 51315610: enhance: avoid using globalThis
1779
+ - Updated dependencies [51315610]
1780
+ - @graphql-tools/utils@8.5.4
1781
+
1782
+ ## 8.4.2
1783
+
1784
+ ### Patch Changes
1785
+
1786
+ - 960e178a: fix: isAsyncIterable should check if it is an object with iterator factory function
1787
+ - Updated dependencies [960e178a]
1788
+ - Updated dependencies [947a3fe0]
1789
+ - @graphql-tools/utils@8.5.3
1790
+
1791
+ ## 8.4.1
1792
+
1793
+ ### Patch Changes
1794
+
1795
+ - 4bfb3428: enhance: use ^ for tslib dependency
1796
+ - Updated dependencies [4bfb3428]
1797
+ - @graphql-tools/batch-execute@8.3.1
1798
+ - @graphql-tools/schema@8.3.1
1799
+ - @graphql-tools/utils@8.5.1
1800
+
1801
+ ## 8.4.0
1802
+
1803
+ ### Minor Changes
1804
+
1805
+ - ad04dc79: enhance: make operationType optional
1806
+
1807
+ ### Patch Changes
1808
+
1809
+ - Updated dependencies [ad04dc79]
1810
+ - @graphql-tools/batch-execute@8.3.0
1811
+ - @graphql-tools/utils@8.5.0
1812
+
1813
+ ## 8.3.0
1814
+
1815
+ ### Minor Changes
1816
+
1817
+ - 149afddb: fix: getting ready for GraphQL v16
1818
+
1819
+ ### Patch Changes
1820
+
1821
+ - Updated dependencies [149afddb]
1822
+ - @graphql-tools/batch-execute@8.2.0
1823
+ - @graphql-tools/schema@8.3.0
1824
+ - @graphql-tools/utils@8.4.0
1825
+
1826
+ ## 8.2.3
1827
+
1828
+ ### Patch Changes
1829
+
1830
+ - 58262be7: enhance: show more clear error messages for aggregated error
1831
+ - Updated dependencies [58262be7]
1832
+ - @graphql-tools/utils@8.3.0
1833
+
1834
+ ## 8.2.2
1835
+
1836
+ ### Patch Changes
1837
+
1838
+ - 014937db: batch-execute enhancements:
1839
+ - fixes bugs with batched fragment definitions
1840
+ - unpathed errors are now returned for all batch results
1841
+ - the "graphqlTools" prefix is simplified down to just "\_"
1842
+ - new tests and documentation
1843
+ - Updated dependencies [014937db]
1844
+ - @graphql-tools/batch-execute@8.1.1
1845
+ - @graphql-tools/utils@8.2.4
1846
+
1847
+ ## 8.2.1
1848
+
1849
+ ### Patch Changes
1850
+
1851
+ - b2f18d6f: fix(delegate): pass an empty array if fieldNodes is falsy
1852
+
1853
+ ## 8.2.0
1854
+
1855
+ ### Minor Changes
1856
+
1857
+ - c5b0719c: enhance(utils): copy inspect util from graphql-js
1858
+ - c5b0719c: feat: GraphQL v16 support
1859
+ - c5b0719c: enhance(utils): move memoize functions to utils
1860
+ - c5b0719c: enhance(utils): copy collectFields from graphql-js@16 for backwards compat
1861
+
1862
+ ### Patch Changes
1863
+
1864
+ - Updated dependencies [c5b0719c]
1865
+ - Updated dependencies [c5b0719c]
1866
+ - Updated dependencies [c5b0719c]
1867
+ - Updated dependencies [c5b0719c]
1868
+ - Updated dependencies [c5b0719c]
1869
+ - @graphql-tools/utils@8.2.0
1870
+ - @graphql-tools/batch-execute@8.1.0
1871
+ - @graphql-tools/schema@8.2.0
1872
+
1873
+ ## 8.1.1
1874
+
1875
+ ### Patch Changes
1876
+
1877
+ - c8c13ed1: enhance: remove TypeMap and small improvements
1878
+ - Updated dependencies [c8c13ed1]
1879
+ - @graphql-tools/utils@8.1.2
1880
+
1881
+ ## 8.1.0
1882
+
1883
+ ### Minor Changes
1884
+
1885
+ - 631b11bd: refactor(delegationPlanner): introduce static version of our piecemeal planner
1886
+
1887
+ ...which, although undocumented, can be accessed within the StitchingInfo object saved in a
1888
+ stitched schema's extensions.
1889
+
1890
+ Also improves memoization technique slightly across the board.
1891
+
1892
+ ### Patch Changes
1893
+
1894
+ - e50852e6: use version ranges instead of a fixed version for the graphql-tools package versions
1895
+ - Updated dependencies [631b11bd]
1896
+ - Updated dependencies [e50852e6]
1897
+ - @graphql-tools/batch-execute@8.0.5
1898
+ - @graphql-tools/schema@8.1.2
1899
+
1900
+ ## 8.0.10
1901
+
1902
+ ### Patch Changes
1903
+
1904
+ - Updated dependencies [2c807ddb]
1905
+ - @graphql-tools/utils@8.1.1
1906
+ - @graphql-tools/batch-execute@8.0.4
1907
+ - @graphql-tools/schema@8.1.1
1908
+
1909
+ ## 8.0.9
1910
+
1911
+ ### Patch Changes
1912
+
1913
+ - 9a13357c: Fix nested type merges with repeated children ignore all but first occurrence
1914
+
1915
+ ## 8.0.8
1916
+
1917
+ ### Patch Changes
1918
+
1919
+ - Updated dependencies [b9684631]
1920
+ - Updated dependencies [9ede806a]
1921
+ - Updated dependencies [67691b78]
1922
+ - @graphql-tools/utils@8.1.0
1923
+ - @graphql-tools/schema@8.1.0
1924
+ - @graphql-tools/batch-execute@8.0.3
1925
+
1926
+ ## 8.0.7
1927
+
1928
+ ### Patch Changes
1929
+
1930
+ - d47dcf42: fix(delegate): visit list values to collect variables
1931
+
1932
+ ## 8.0.6
1933
+
1934
+ ### Patch Changes
1935
+
1936
+ - ded29f3d: fix(delegate): collect variables from directives on FragmentSpread
1937
+
1938
+ ## 8.0.5
1939
+
1940
+ ### Patch Changes
1941
+
1942
+ - 7fdef335: fix(delegate): handle variables correctly
1943
+
1944
+ ## 8.0.4
1945
+
1946
+ ### Patch Changes
1947
+
1948
+ - Updated dependencies [04830049]
1949
+ - @graphql-tools/utils@8.0.2
1950
+ - @graphql-tools/batch-execute@8.0.2
1951
+ - @graphql-tools/schema@8.0.2
1952
+
1953
+ ## 8.0.3
1954
+
1955
+ ### Patch Changes
1956
+
1957
+ - Updated dependencies [b823dbaf]
1958
+ - @graphql-tools/utils@8.0.1
1959
+ - @graphql-tools/batch-execute@8.0.1
1960
+ - @graphql-tools/schema@8.0.1
1961
+
1962
+ ## 8.0.2
1963
+
1964
+ ### Patch Changes
1965
+
1966
+ - d93945fa: fix(delegate): ignore if stitchingInfo is not in extensions
1967
+
1968
+ ## 8.0.1
1969
+
1970
+ ### Patch Changes
1971
+
1972
+ - c36defbe: fix(delegate): fix ESM import
1973
+
1974
+ ## 8.0.0
1975
+
1976
+ ### Major Changes
1977
+
1978
+ - 7d3e3006: BREAKING CHANGE
1979
+ - Remove `rootValue` from subschemaConfig
1980
+ - - Pass it through `ExecutionParams` or delegation options
1981
+ - Do not pass `info.rootValue` if `rootValue` is falsy
1982
+ - d53e3be5: BREAKING CHANGES;
1983
+
1984
+ Refactor the core delegation transforms into individual functions to modify request and results.
1985
+ This will improve the performance considerably by reducing the number of visits over the request
1986
+ document.
1987
+
1988
+ - Replace `CheckResultAndHandleErrors` with `checkResultAndHandleErrors`
1989
+ - Remove `delegationBindings`
1990
+ - Replace `AddArgumentsAsVariables`, `AddSelectionSets`, `AddTypenameToAbstract`,
1991
+ `ExpandAbstractTypes`, `FilterToSchema`, `VisitSelectionSets` and `WrapConcreteTypes` with
1992
+ `prepareGatewayDocument` and `finalizeGatewayRequest`
1993
+
1994
+ - dae6dc7b: refactor: ExecutionParams type replaced by Request type
1995
+
1996
+ rootValue property is now a part of the Request type.
1997
+
1998
+ When delegating with delegateToSchema, rootValue can be set multiple ways:
1999
+
2000
+ - when using a custom executor, the custom executor can utilize a rootValue in whichever custom
2001
+ way it specifies.
2002
+ - when using the default executor (execute/subscribe from graphql-js): -- rootValue can be passed
2003
+ to delegateToSchema via a named option -- rootValue can be included within a subschemaConfig --
2004
+ otherwise, rootValue is inferred from the originating schema
2005
+
2006
+ When using wrapSchema/stitchSchemas, a subschemaConfig can specify the createProxyingResolver
2007
+ function which can pass whatever rootValue it wants to delegateToSchema as above.
2008
+
2009
+ - c42e811d: BREAKING CHANGES;
2010
+
2011
+ - Rename `Request` to `ExecutionRequest`
2012
+ - Add required `operationType: OperationTypeNode` field in `ExecutionRequest`
2013
+ - Add `context` in `createRequest` and `createRequestInfo` instead of `delegateToSchema`
2014
+
2015
+ > It doesn't rely on info.operation.operationType to allow the user to call an operation from
2016
+ > different root type. And it doesn't call getOperationAST again and again to get operation type
2017
+ > from the document/operation because we have it in Request and ExecutionParams
2018
+ > https://github.com/ardatan/graphql-tools/pull/3166/files#diff-d4824895ea613dcc1f710c3ac82e952fe0ca12391b671f70d9f2d90d5656fdceR38
2019
+
2020
+ Improvements;
2021
+
2022
+ - Memoize `defaultExecutor` for a single `GraphQLSchema` so allow `getBatchingExecutor` to memoize
2023
+ `batchingExecutor` correctly.
2024
+ - And there is no different `defaultExecutor` is created for `subscription` and other operation
2025
+ types. Only one executor is used.
2026
+
2027
+ > Batch executor is memoized by `executor` reference but `createDefaultExecutor` didn't memoize
2028
+ > the default executor so this memoization wasn't working correctly on `batch-execute` side.
2029
+ > https://github.com/ardatan/graphql-tools/blob/remove-info-executor/packages/batch-execute/src/getBatchingExecutor.ts#L9
2030
+
2031
+ - 7d3e3006: BREAKING CHANGE
2032
+ - Now it uses the native
2033
+ [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)
2034
+ implementation. The major difference is the individual errors are kept under `errors` property
2035
+ instead of the object itself with `Symbol.iterator`.
2036
+ ```js
2037
+ // From;
2038
+ for (const error of aggregateError)
2039
+ // To;
2040
+ for (const error of aggregateError.errors)
2041
+ ```
2042
+ - aa43054d: BREAKING CHANGE: validations are skipped by default, use validateRequest: true to
2043
+ reenable
2044
+ - c0ca3190: BREAKING CHANGE
2045
+ - Remove Subscriber and use only Executor
2046
+ - - Now `Executor` can receive `AsyncIterable` and subscriptions will also be handled by
2047
+ `Executor`. This is a future-proof change for defer, stream and live queries
2048
+
2049
+ ### Patch Changes
2050
+
2051
+ - Updated dependencies [af9a78de]
2052
+ - Updated dependencies [9c26b847]
2053
+ - Updated dependencies [7d3e3006]
2054
+ - Updated dependencies [7d3e3006]
2055
+ - Updated dependencies [dae6dc7b]
2056
+ - Updated dependencies [6877b913]
2057
+ - Updated dependencies [7d3e3006]
2058
+ - Updated dependencies [c42e811d]
2059
+ - Updated dependencies [7d3e3006]
2060
+ - Updated dependencies [8c8d4fc0]
2061
+ - Updated dependencies [7d3e3006]
2062
+ - Updated dependencies [7d3e3006]
2063
+ - Updated dependencies [7d3e3006]
2064
+ - Updated dependencies [74581cf3]
2065
+ - Updated dependencies [c0ca3190]
2066
+ - Updated dependencies [7d3e3006]
2067
+ - Updated dependencies [982c8f53]
2068
+ - Updated dependencies [7d3e3006]
2069
+ - Updated dependencies [7d3e3006]
2070
+ - Updated dependencies [7d3e3006]
2071
+ - @graphql-tools/utils@8.0.0
2072
+ - @graphql-tools/schema@8.0.0
2073
+ - @graphql-tools/batch-execute@8.0.0
2074
+
2075
+ ## 7.1.5
2076
+
2077
+ ### Patch Changes
2078
+
2079
+ - 22a9f3da: fix(deps): follow package conventions on when to pin
2080
+ - Updated dependencies [22a9f3da]
2081
+ - @graphql-tools/batch-execute@7.1.2
2082
+ - @graphql-tools/schema@7.1.5
2083
+
2084
+ ## 7.1.4
2085
+
2086
+ ### Patch Changes
2087
+
2088
+ - 61da3e82: use value-or-promise to streamline working with sync values or async promises
2089
+ - Updated dependencies [61da3e82]
2090
+ - @graphql-tools/batch-execute@7.1.1
2091
+ - @graphql-tools/schema@7.1.4
2092
+
2093
+ ## 7.1.3
2094
+
2095
+ ### Patch Changes
2096
+
2097
+ - b202587b: fix(delegate): handle executor errors
2098
+
2099
+ ## 7.1.2
2100
+
2101
+ ### Patch Changes
2102
+
2103
+ - 6aed1714: Allows `MergedTypeConfig` to be written with an `entryPoints` array for multiple merged
2104
+ type entry points, each with their own `fieldName` and `selectionSet`:
2105
+
2106
+ ```js
2107
+ {
2108
+ schema: testSchema,
2109
+ merge: {
2110
+ Product: {
2111
+ entryPoints: [{
2112
+ selectionSet: '{ id }',
2113
+ fieldName: 'productById',
2114
+ key: ({ id, price, weight }) => ({ id, price, weight }),
2115
+ argsFromKeys: (key) => ({ key }),
2116
+ }, {
2117
+ selectionSet: '{ upc }',
2118
+ fieldName: 'productByUpc',
2119
+ key: ({ upc, price, weight }) => ({ upc, price, weight }),
2120
+ argsFromKeys: (key) => ({ key }),
2121
+ }],
2122
+ }
2123
+ }
2124
+ }
2125
+ ```
2126
+
2127
+ These multiple entry points accommodate types with multiple keys across services that rely on a
2128
+ central service to join them, for example:
2129
+
2130
+ - Catalog service: `type Product { upc }`
2131
+ - Vendors service: `type Product { upc id }`
2132
+ - Reviews service: `type Product { id }`
2133
+
2134
+ Given this graph, the possible traversals require the Vendors service to provide entry points for
2135
+ each unique key format:
2136
+
2137
+ - `Catalog > Vendors > Reviews`
2138
+ - `Catalog < Vendors > Reviews`
2139
+ - `Catalog < Vendors < Reviews`
2140
+
2141
+ Is it highly recommended that you enable query batching for subschemas with multiple entry points.
2142
+
2143
+ ## 7.1.1
2144
+
2145
+ ### Patch Changes
2146
+
2147
+ - f84e7b15: fix(delegate): export executor typings not to have breaking change
2148
+ - Updated dependencies [194ac370]
2149
+ - @graphql-tools/utils@7.7.1
2150
+
2151
+ ## 7.1.0
2152
+
2153
+ ### Minor Changes
2154
+
2155
+ - 58fd4b28: feat(types): add TContext to stitchSchemas and executor
2156
+
2157
+ ### Patch Changes
2158
+
2159
+ - Updated dependencies [58fd4b28]
2160
+ - Updated dependencies [43da6b59]
2161
+ - @graphql-tools/batch-execute@7.1.0
2162
+ - @graphql-tools/utils@7.7.0
2163
+
2164
+ ## 7.0.10
2165
+
2166
+ ### Patch Changes
2167
+
2168
+ - 24926654: Deprecates the `MergeTypeConfig.computedFields` setting (with backwards-compatible
2169
+ warning) in favor of new computed field configuration written as:
2170
+
2171
+ ```js
2172
+ merge: {
2173
+ MyType: {
2174
+ fields: {
2175
+ myComputedField: {
2176
+ selectionSet: '{ weight }',
2177
+ computed: true,
2178
+ }
2179
+ }
2180
+ }
2181
+ }
2182
+ ```
2183
+
2184
+ A field-level `selectionSet` specifies field dependencies while the `computed` setting structures
2185
+ the field in a way that assures it is always selected with this data provided. The `selectionSet`
2186
+ is intentionally generic to support possible future uses. This new pattern organizes all
2187
+ field-level configuration (including `canonical`) into a single structure.
2188
+
2189
+ ## 7.0.9
2190
+
2191
+ ### Patch Changes
2192
+
2193
+ - d9b82a2e: fix(delegate) fix array check
2194
+ - d9b82a2e: enhance(stitch) canonical merged type and field definitions. Use the @canonical
2195
+ directive to promote preferred type and field descriptions into the combined gateway schema.
2196
+
2197
+ ## 7.0.8
2198
+
2199
+ ### Patch Changes
2200
+
2201
+ - cd5da458: fix(stitch): type merging for nested root types
2202
+
2203
+ Because root types do not usually require selectionSets, a nested root type proxied to a remote
2204
+ service may end up having an empty selectionSet, if the nested root types only includes fields
2205
+ from a different subservice.
2206
+
2207
+ Empty selection sets return null, but, in this case, it should return an empty object. We can
2208
+ force this behavior by including the \_\_typename field which exists on every schema.
2209
+
2210
+ Addresses #2347.
2211
+
2212
+ In the future, we may want to include short-circuiting behavior that when delegating to composite
2213
+ fields, if an empty selection set is included, an empty object is returned rather than null. This
2214
+ short-circuiting behavior would be complex for lists, as it would be unclear the length of the
2215
+ list...
2216
+
2217
+ - cd5da458: fix(delegate): resolve external values only once
2218
+
2219
+ Because items in a list may be identical and the defaultMergedResolver mutates those objects when
2220
+ resolving them as external values, a check is required so that the mutation happens only once.
2221
+
2222
+ Partially addresses #2304
2223
+
2224
+ - Updated dependencies [cd5da458]
2225
+ - @graphql-tools/utils@7.1.6
2226
+
2227
+ ## 7.0.7
2228
+
2229
+ ### Patch Changes
2230
+
2231
+ - 1b730f80: fix(typeMerging): enable subschemas to use keys that have been renamed via transforms
2232
+ - 29ead57c: fix(batch-delegate): proxy batched errors
2233
+
2234
+ ## 7.0.6
2235
+
2236
+ ### Patch Changes
2237
+
2238
+ - d40c0a84: fix(delegate): add selectionSets prior to expanding abstract types
2239
+
2240
+ ## 7.0.5
2241
+
2242
+ ### Patch Changes
2243
+
2244
+ - e50f80a3: enhance(stitch): custom merge resolvers
2245
+
2246
+ ## 7.0.4
2247
+
2248
+ ### Patch Changes
2249
+
2250
+ - 83b8e428: fix(delegate): import AggregateError polyfill (#2196)
2251
+
2252
+ ## 7.0.3
2253
+
2254
+ ### Patch Changes
2255
+
2256
+ - 856e23fa: fix(delegate): WrapConcreteTypes should not process fragments that are not on a root
2257
+ type (#2173)
2258
+ - Updated dependencies [e3176633]
2259
+ - @graphql-tools/utils@7.0.2
2260
+
2261
+ ## 7.0.2
2262
+
2263
+ ### Patch Changes
2264
+
2265
+ - 718eda30: fix(stitch): fix mergeExternalObject regressions
2266
+
2267
+ v7 introduced a regression in the merging of ExternalObjects that causes type merging to fail when
2268
+ undergoing multiple rounds of merging.
2269
+
2270
+ ## 7.0.1
2271
+
2272
+ ### Patch Changes
2273
+
2274
+ - 294dedda: fix(delegate): Fix type error with `arguments` being undefined
2275
+ - Updated dependencies [8133a907]
2276
+ - Updated dependencies [2b6c813e]
2277
+ - @graphql-tools/utils@7.0.1
2278
+
2279
+ ## 7.0.0
2280
+
2281
+ ### Major Changes
2282
+
2283
+ - be1a1575: ## Breaking Changes:
2284
+
2285
+ #### Schema Generation and Decoration API (`@graphql-tools/schema`)
2286
+
2287
+ - Resolver validation options should now be set to `error`, `warn` or `ignore` rather than `true`
2288
+ or `false`. In previous versions, some of the validators caused errors to be thrown, while some
2289
+ issued warnings. This changes brings consistency to validator behavior.
2290
+
2291
+ - The `allowResolversNotInSchema` has been renamed to `requireResolversToMatchSchema`, to
2292
+ harmonize the naming convention of all the validators. The default setting of
2293
+ `requireResolversToMatchSchema` is `error`, matching the previous behavior.
2294
+
2295
+ #### Schema Delegation (`delegateToSchema` & `@graphql-tools/delegate`)
2296
+
2297
+ - The `delegateToSchema` return value has matured and been formalized as an `ExternalObject`, in
2298
+ which all errors are integrated into the GraphQL response, preserving their initial path. Those
2299
+ advanced users accessing the result directly will note the change in error handling. This also
2300
+ allows for the deprecation of unnecessary helper functions including `slicedError`, `getErrors`,
2301
+ `getErrorsByPathSegment` functions. Only external errors with missing or invalid paths must
2302
+ still be preserved by annotating the remote object with special properties. The new
2303
+ `getUnpathedErrors` function is therefore necessary for retrieving only these errors. Note also
2304
+ the new `annotateExternalObject` and `mergeExternalObjects` functions, as well as the renaming
2305
+ of `handleResult` to `resolveExternalValue`.
2306
+
2307
+ - Transform types and the `applySchemaTransforms` are now relocated to the `delegate` package;
2308
+ `applyRequestTransforms`/`applyResultTransforms` functions have been deprecated, however, as
2309
+ this functionality has been replaced since v6 by the `Transformer` abstraction.
2310
+
2311
+ - The `transformRequest`/`transformResult` methods are now provided additional `delegationContext`
2312
+ and `transformationContext` arguments -- these were introduced in v6, but previously optional.
2313
+
2314
+ - The `transformSchema` method may wish to create additional delegating resolvers and so it is now
2315
+ provided the `subschemaConfig` and final (non-executable) `transformedSchema` parameters. As in
2316
+ v6, the `transformSchema` is kicked off once to produce the non-executable version, and then, if
2317
+ a wrapping schema is being generated, proxying resolvers are created with access to the
2318
+ (non-executable) initial result. In v7, the individual `transformSchema` methods also get access
2319
+ to the result of the first run, if necessary, they can create additional wrapping schema
2320
+ proxying resolvers.
2321
+
2322
+ - `applySchemaTransforms` parameters have been updated to match and support the `transformSchema`
2323
+ parameters above.
2324
+
2325
+ #### Remote Schemas & Wrapping (`wrapSchema`, `makeRemoteExecutableSchema`, and `@graphql-tools/wrap`)
2326
+
2327
+ - `wrapSchema` and `generateProxyingResolvers` now only take a single options argument with named
2328
+ properties of type `SubschemaConfig`. The previously possible shorthand version with first
2329
+ argument consisting of a `GraphQLSchema` and second argument representing the transforms should
2330
+ be reworked as a `SubschemaConfig` object.
2331
+
2332
+ - Similarly, the `ICreateProxyingResolverOptions` interface that provides the options for the
2333
+ `createProxyingResolver` property of `SubschemaConfig` options has been adjusted. The `schema`
2334
+ property previously could be set to a `GraphQLSchema` or a `SubschemaConfig` object. This
2335
+ property has been removed in favor of a `subschemaConfig` property that will always be a
2336
+ `SubschemaConfig` object. The `transforms` property has been removed; transforms should be
2337
+ included within the `SubschemaConfig` object.`
2338
+
2339
+ - The format of the wrapping schema has solidified. All non-root fields are expected to use
2340
+ identical resolvers, either `defaultMergedResolver` or a custom equivalent, with root fields
2341
+ doing the hard work of proxying. Support for custom merged resolvers throught
2342
+ `createMergedResolver` has been deprecated, as custom merging resolvers conflicts when using
2343
+ stitching's type merging, where resolvers are expected to be identical across subschemas.
2344
+
2345
+ - The `WrapFields` transform's `wrappingResolver` option has been removed, as this complicates
2346
+ multiple wrapping layers, as well as planned functionality to wrap subscription root fields in
2347
+ potentially multiple layers, as the wrapping resolvers may be different in different layers.
2348
+ Modifying resolvers can still be performed by use of an additional transform such as
2349
+ `TransformRootFields` or `TransformObjectFields`.
2350
+
2351
+ - The `ExtendSchema` transform has been removed, as it is conceptually simpler just to use
2352
+ `stitchSchemas` with one subschema.
2353
+
2354
+ - The `ReplaceFieldsWithFragment`, `AddFragmentsByField`, `AddSelectionSetsByField`, and
2355
+ `AddMergedTypeSelectionSets` transforms has been removed, as they are superseded by the
2356
+ `AddSelectionSets` and `VisitSelectionSets` transforms. The `AddSelectionSets` purposely takes
2357
+ parsed SDL rather than strings, to nudge end users to parse these strings at build time (when
2358
+ possible), rather than at runtime. Parsing of selection set strings can be performed using the
2359
+ `parseSelectionSet` function from `@graphql-tools/utils`.
2360
+
2361
+ #### Schema Stitching (`stitchSchemas` & `@graphql-tools/stitch`)
2362
+
2363
+ - `stitchSchemas`'s `mergeTypes` option is now true by default! This causes the `onTypeConflict`
2364
+ option to be ignored by default. To use `onTypeConflict` to select a specific type instead of
2365
+ simply merging, simply set `mergeTypes` to false.
2366
+
2367
+ - `schemas` argument has been deprecated, use `subschemas`, `typeDefs`, or `types`, depending on
2368
+ what you are stitching.
2369
+
2370
+ - When using batch delegation in type merging, the `argsFromKeys` function is now set only via the
2371
+ `argsFromKeys` property. Previously, if `argsFromKeys` was absent, it could be read from `args`.
2372
+
2373
+ - Support for fragment hints has been removed in favor of selection set hints.
2374
+
2375
+ - `stitchSchemas` now processes all `GraphQLSchema` and `SubschemaConfig` subschema input into new
2376
+ `Subschema` objects, handling schema config directives such aso`@computed` as well as generating
2377
+ the final transformed schema, stored as the `transformedSchema` property, if transforms are
2378
+ used. Signatures of the `onTypeConflict`, `fieldConfigMerger`, and `inputFieldConfigMerger` have
2379
+ been updated to include metadata related to the original and transformed subschemas. Note the
2380
+ property name change for `onTypeConflict` from `schema` to `subschema`.
2381
+
2382
+ #### Mocking (`addMocksToSchema` and `@graphql-tools/mock`)
2383
+
2384
+ - Mocks returning objects with fields set as functions are now operating according to upstream
2385
+ graphql-js convention, i.e. these functions take three arguments, `args`, `context`, and `info`
2386
+ with `parent` available as `this` rather than as the first argument.
2387
+
2388
+ #### Other Utilities (`@graphql-tools/utils`)
2389
+
2390
+ - `filterSchema`'s `fieldFilter` will now filter _all_ fields across Object, Interface, and Input
2391
+ types. For the previous Object-only behavior, switch to the `objectFieldFilter` option.
2392
+ - Unused `fieldNodes` utility functions have been removed.
2393
+ - Unused `typeContainsSelectionSet` function has been removed, and `typesContainSelectionSet` has
2394
+ been moved to the `stitch` package.
2395
+ - Unnecessary `Operation` type has been removed in favor of `OperationTypeNode` from upstream
2396
+ graphql-js.
2397
+ - As above, `applySchemaTransforms`/`applyRequestTransforms`/`applyResultTransforms` have been
2398
+ removed from the `utils` package, as they are implemented elsewhere or no longer necessary.
2399
+
2400
+ ## Related Issues
2401
+
2402
+ - proxy all the errors: #1047, #1641
2403
+ - better error handling for merges #2016, #2062
2404
+ - fix typings #1614
2405
+ - disable implicit schema pruning #1817
2406
+ - mocks not working for functions #1807
2407
+
2408
+ ### Patch Changes
2409
+
2410
+ - Updated dependencies [be1a1575]
2411
+ - @graphql-tools/batch-execute@7.0.0
2412
+ - @graphql-tools/schema@7.0.0
2413
+ - @graphql-tools/utils@7.0.0
2414
+
2415
+ ## 6.2.4
2416
+
2417
+ ### Patch Changes
2418
+
2419
+ - 32c3c4f8: enhance(stitching): improve error message for unknown types
2420
+ - 533d6d53: Bump all packages to allow adjustments
2421
+ - Updated dependencies [32c3c4f8]
2422
+ - Updated dependencies [533d6d53]
2423
+ - @graphql-tools/utils@6.2.4
2424
+ - @graphql-tools/schema@6.2.4