@graphql-tools/batch-execute
Advanced tools
Comparing version 9.0.0 to 9.0.1-alpha-20230809181317-aca946d4
@@ -6,6 +6,6 @@ "use strict"; | ||
const dataloader_1 = tslib_1.__importDefault(require("dataloader")); | ||
const value_or_promise_1 = require("value-or-promise"); | ||
const utils_1 = require("@graphql-tools/utils"); | ||
const mergeRequests_js_1 = require("./mergeRequests.js"); | ||
const splitResult_js_1 = require("./splitResult.js"); | ||
const value_or_promise_1 = require("value-or-promise"); | ||
function createBatchingExecutor(executor, dataLoaderOptions, extensionsReducer = defaultExtensionsReducer) { | ||
@@ -12,0 +12,0 @@ const loadFn = createLoadFn(executor, extensionsReducer); |
@@ -36,3 +36,4 @@ "use strict"; | ||
const newError = (0, utils_1.relocatedError)(error, [originalKey, ...error.path.slice(1)]); | ||
const resultErrors = (splitResults[index].errors = (splitResults[index].errors || [])); | ||
const resultErrors = (splitResults[index].errors = (splitResults[index].errors || | ||
[])); | ||
resultErrors.push(newError); | ||
@@ -39,0 +40,0 @@ } |
import DataLoader from 'dataloader'; | ||
import { getOperationASTFromRequest } from '@graphql-tools/utils'; | ||
import { ValueOrPromise } from 'value-or-promise'; | ||
import { getOperationASTFromRequest, } from '@graphql-tools/utils'; | ||
import { mergeRequests } from './mergeRequests.js'; | ||
import { splitResult } from './splitResult.js'; | ||
import { ValueOrPromise } from 'value-or-promise'; | ||
export function createBatchingExecutor(executor, dataLoaderOptions, extensionsReducer = defaultExtensionsReducer) { | ||
@@ -7,0 +7,0 @@ const loadFn = createLoadFn(executor, extensionsReducer); |
// adapted from https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js | ||
import { visit, Kind, } from 'graphql'; | ||
import { Kind, visit, } from 'graphql'; | ||
import { getOperationASTFromRequest } from '@graphql-tools/utils'; | ||
@@ -4,0 +4,0 @@ import { createPrefix } from './prefix.js'; |
@@ -33,3 +33,4 @@ // adapted from https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js | ||
const newError = relocatedError(error, [originalKey, ...error.path.slice(1)]); | ||
const resultErrors = (splitResults[index].errors = (splitResults[index].errors || [])); | ||
const resultErrors = (splitResults[index].errors = (splitResults[index].errors || | ||
[])); | ||
resultErrors.push(newError); | ||
@@ -36,0 +37,0 @@ } |
{ | ||
"name": "@graphql-tools/batch-execute", | ||
"version": "9.0.0", | ||
"version": "9.0.1-alpha-20230809181317-aca946d4", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
import DataLoader from 'dataloader'; | ||
import { Executor, ExecutionRequest } from '@graphql-tools/utils'; | ||
import { ExecutionRequest, Executor } from '@graphql-tools/utils'; | ||
export declare function createBatchingExecutor(executor: Executor, dataLoaderOptions?: DataLoader.Options<any, any, any>, extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>): Executor; |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36547
835
2