@graphql-hive/plugin-deduplicate-request 2.1.0 → 2.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @graphql-hive/plugin-deduplicate-request
2
2
 
3
+ ## 2.1.1
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [`62175b8`](https://github.com/graphql-hive/gateway/commit/62175b81b04237825372370de04dbdc11c239a01) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Use semver dependencies matched by minor
9
+
3
10
  ## 2.1.0
4
11
  ### Minor Changes
5
12
 
package/dist/index.d.cts CHANGED
@@ -192,6 +192,13 @@ type CreateProxyingResolverFn<TContext = Record<string, any>> = (options: ICreat
192
192
  interface BatchingOptions<K = any, V = any, C = K> {
193
193
  extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>;
194
194
  dataLoaderOptions?: DataLoader.Options<K, V, C>;
195
+ /**
196
+ * When true, each batched sub-request's root selections are wrapped in
197
+ * `@defer` so a defer-capable executor can deliver fast results without
198
+ * waiting for the slowest sibling in the batch. Requires an executor that
199
+ * returns incremental results (e.g. `@graphql-tools/executor`).
200
+ */
201
+ defer?: boolean;
195
202
  }
196
203
  interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any>> {
197
204
  name?: string;
@@ -203,6 +210,13 @@ interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any
203
210
  executor?: Executor<TContext>;
204
211
  batch?: boolean;
205
212
  batchingOptions?: BatchingOptions<K, V, C>;
213
+ /**
214
+ * When true, `@defer` is forwarded to this subschema and incremental patches
215
+ * from its executor are merged into the gateway result. When false/omitted,
216
+ * `@defer` is owned by the gateway (deferred selections are omitted from the
217
+ * subgraph request and resolved later via type-merging / local resolvers).
218
+ */
219
+ defer?: boolean;
206
220
  }
207
221
  interface MergedTypeConfig<K = any, V = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, V, TContext> {
208
222
  entryPoints?: Array<MergedTypeEntryPoint>;
@@ -240,6 +254,7 @@ declare class Subschema<K = any, V = any, C = K, TContext = Record<string, any>>
240
254
  executor?: Executor<TContext>;
241
255
  batch?: boolean;
242
256
  batchingOptions?: BatchingOptions<K, V, C>;
257
+ defer?: boolean;
243
258
  createProxyingResolver?: CreateProxyingResolverFn<TContext>;
244
259
  transforms: Array<Transform<any, TContext>>;
245
260
  private _transformedSchema;
package/dist/index.d.ts CHANGED
@@ -192,6 +192,13 @@ type CreateProxyingResolverFn<TContext = Record<string, any>> = (options: ICreat
192
192
  interface BatchingOptions<K = any, V = any, C = K> {
193
193
  extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>;
194
194
  dataLoaderOptions?: DataLoader.Options<K, V, C>;
195
+ /**
196
+ * When true, each batched sub-request's root selections are wrapped in
197
+ * `@defer` so a defer-capable executor can deliver fast results without
198
+ * waiting for the slowest sibling in the batch. Requires an executor that
199
+ * returns incremental results (e.g. `@graphql-tools/executor`).
200
+ */
201
+ defer?: boolean;
195
202
  }
196
203
  interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any>> {
197
204
  name?: string;
@@ -203,6 +210,13 @@ interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any
203
210
  executor?: Executor<TContext>;
204
211
  batch?: boolean;
205
212
  batchingOptions?: BatchingOptions<K, V, C>;
213
+ /**
214
+ * When true, `@defer` is forwarded to this subschema and incremental patches
215
+ * from its executor are merged into the gateway result. When false/omitted,
216
+ * `@defer` is owned by the gateway (deferred selections are omitted from the
217
+ * subgraph request and resolved later via type-merging / local resolvers).
218
+ */
219
+ defer?: boolean;
206
220
  }
207
221
  interface MergedTypeConfig<K = any, V = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, V, TContext> {
208
222
  entryPoints?: Array<MergedTypeEntryPoint>;
@@ -240,6 +254,7 @@ declare class Subschema<K = any, V = any, C = K, TContext = Record<string, any>>
240
254
  executor?: Executor<TContext>;
241
255
  batch?: boolean;
242
256
  batchingOptions?: BatchingOptions<K, V, C>;
257
+ defer?: boolean;
243
258
  createProxyingResolver?: CreateProxyingResolverFn<TContext>;
244
259
  transforms: Array<Transform<any, TContext>>;
245
260
  private _transformedSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/plugin-deduplicate-request",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,7 +47,7 @@
47
47
  "@whatwg-node/promise-helpers": "^1.3.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@graphql-hive/gateway-runtime": "2.11.0",
50
+ "@graphql-hive/gateway-runtime": "^2.13.0",
51
51
  "@graphql-mesh/types": "^0.107.1",
52
52
  "@whatwg-node/fetch": "^0.10.13",
53
53
  "graphql": "^16.12.0",