@graphql-tools/batch-execute 10.0.6 → 10.0.7

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-tools/batch-execute
2
2
 
3
+ ## 10.0.7
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#2076](https://github.com/graphql-hive/gateway/pull/2076) [`08c9da2`](https://github.com/graphql-hive/gateway/commit/08c9da28af4587aa823f3b7a10af493fa87dab87) Thanks [@ardatan](https://github.com/ardatan)! - Add automatic batching to SDK requester
9
+
3
10
  ## 10.0.6
4
11
  ### Patch Changes
5
12
 
package/dist/index.cjs CHANGED
@@ -246,6 +246,9 @@ function splitResult({ data, errors }, numResults) {
246
246
  const splitResults = new Array(numResults);
247
247
  if (data) {
248
248
  for (const prefixedKey in data) {
249
+ if (prefixedKey === "__proto__" || prefixedKey === "constructor" || prefixedKey === "prototype") {
250
+ continue;
251
+ }
249
252
  const { index, originalKey } = parseKey(prefixedKey);
250
253
  const result = splitResults[index];
251
254
  if (result == null) {
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { Executor, ExecutionRequest } from '@graphql-tools/utils';
1
+ import { Executor, ExecutionRequest, MaybeAsyncIterable } from '@graphql-tools/utils';
2
2
  import DataLoader from 'dataloader';
3
3
 
4
- declare function createBatchingExecutor(executor: Executor, dataLoaderOptions?: DataLoader.Options<any, any, any>, extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>): Executor;
4
+ declare function createBatchingExecutor(executor: Executor, dataLoaderOptions?: DataLoader.Options<ExecutionRequest, MaybeAsyncIterable<any>>, extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>): Executor;
5
5
 
6
6
  declare const getBatchingExecutor: (_context: Record<string, any>, executor: Executor, dataLoaderOptions?: DataLoader.Options<any, any, any> | undefined, extensionsReducer?: undefined | ((mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>)) => Executor;
7
7
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Executor, ExecutionRequest } from '@graphql-tools/utils';
1
+ import { Executor, ExecutionRequest, MaybeAsyncIterable } from '@graphql-tools/utils';
2
2
  import DataLoader from 'dataloader';
3
3
 
4
- declare function createBatchingExecutor(executor: Executor, dataLoaderOptions?: DataLoader.Options<any, any, any>, extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>): Executor;
4
+ declare function createBatchingExecutor(executor: Executor, dataLoaderOptions?: DataLoader.Options<ExecutionRequest, MaybeAsyncIterable<any>>, extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>): Executor;
5
5
 
6
6
  declare const getBatchingExecutor: (_context: Record<string, any>, executor: Executor, dataLoaderOptions?: DataLoader.Options<any, any, any> | undefined, extensionsReducer?: undefined | ((mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>)) => Executor;
7
7
 
package/dist/index.js CHANGED
@@ -240,6 +240,9 @@ function splitResult({ data, errors }, numResults) {
240
240
  const splitResults = new Array(numResults);
241
241
  if (data) {
242
242
  for (const prefixedKey in data) {
243
+ if (prefixedKey === "__proto__" || prefixedKey === "constructor" || prefixedKey === "prototype") {
244
+ continue;
245
+ }
243
246
  const { index, originalKey } = parseKey(prefixedKey);
244
247
  const result = splitResults[index];
245
248
  if (result == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/batch-execute",
3
- "version": "10.0.6",
3
+ "version": "10.0.7",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {