Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/executor

Package Overview
Dependencies
Maintainers
0
Versions
386
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/executor - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7-alpha-20241209101052-b0932c49214ceb915e4bebbab82ae2fee9dfba47

3

cjs/execution/coerceError.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerceError = void 0;
exports.coerceError = coerceError;
function coerceError(error) {

@@ -26,2 +26,1 @@ if (error instanceof Error) {

}
exports.coerceError = coerceError;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isIncrementalResult = exports.getFieldDef = exports.flattenIncrementalResults = exports.subscribe = exports.defaultFieldResolver = exports.defaultTypeResolver = exports.CRITICAL_ERROR = exports.buildResolveInfo = exports.buildExecutionContext = exports.getFragmentsFromDocument = exports.assertValidExecutionArguments = exports.executeSync = exports.execute = void 0;
exports.defaultFieldResolver = exports.defaultTypeResolver = exports.CRITICAL_ERROR = exports.getFragmentsFromDocument = void 0;
exports.execute = execute;
exports.executeSync = executeSync;
exports.assertValidExecutionArguments = assertValidExecutionArguments;
exports.buildExecutionContext = buildExecutionContext;
exports.buildResolveInfo = buildResolveInfo;
exports.subscribe = subscribe;
exports.flattenIncrementalResults = flattenIncrementalResults;
exports.getFieldDef = getFieldDef;
exports.isIncrementalResult = isIncrementalResult;
const graphql_1 = require("graphql");
const value_or_promise_1 = require("value-or-promise");
const utils_1 = require("@graphql-tools/utils");
const disposablestack_1 = require("@whatwg-node/disposablestack");
const coerceError_js_1 = require("./coerceError.js");

@@ -53,3 +63,2 @@ const flattenAsyncIterable_js_1 = require("./flattenAsyncIterable.js");

}
exports.execute = execute;
function executeImpl(exeContext) {

@@ -111,3 +120,2 @@ if (exeContext.signal?.aborted) {

}
exports.executeSync = executeSync;
/**

@@ -133,3 +141,2 @@ * Given a completed execution context and data, build the `{ errors, data }`

}
exports.assertValidExecutionArguments = assertValidExecutionArguments;
exports.getFragmentsFromDocument = (0, utils_1.memoize1)(function getFragmentsFromDocument(document) {

@@ -208,3 +215,2 @@ const fragments = Object.create(null);

}
exports.buildExecutionContext = buildExecutionContext;
function buildPerEventExecutionContext(exeContext, payload) {

@@ -393,3 +399,2 @@ return {

}
exports.buildResolveInfo = buildResolveInfo;
exports.CRITICAL_ERROR = 'CRITICAL_ERROR';

@@ -832,3 +837,2 @@ function handleFieldError(error, returnType, errors) {

}
exports.subscribe = subscribe;
function flattenIncrementalResults(incrementalResults) {

@@ -863,5 +867,8 @@ const subsequentIterator = incrementalResults.subsequentResults;

},
[disposablestack_1.DisposableSymbols.asyncDispose]() {
done = true;
return subsequentIterator?.[disposablestack_1.DisposableSymbols.asyncDispose]?.();
},
};
}
exports.flattenIncrementalResults = flattenIncrementalResults;
async function* ensureAsyncIterable(someExecutionResult) {

@@ -1245,2 +1252,6 @@ if ('initialResult' in someExecutionResult) {

},
async [disposablestack_1.DisposableSymbols.asyncDispose]() {
await returnStreamIterators();
isDone = true;
},
};

@@ -1360,6 +1371,4 @@ }

}
exports.getFieldDef = getFieldDef;
function isIncrementalResult(result) {
return 'incremental' in result;
}
exports.isIncrementalResult = isIncrementalResult;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flattenAsyncIterable = void 0;
exports.flattenAsyncIterable = flattenAsyncIterable;
const disposablestack_1 = require("@whatwg-node/disposablestack");
/**

@@ -87,4 +88,10 @@ * Given an AsyncIterable of AsyncIterables, flatten all yielded results into a

},
async [disposablestack_1.DisposableSymbols.asyncDispose]() {
done = true;
await Promise.all([
currentNestedIterator?.[disposablestack_1.DisposableSymbols.asyncDispose]?.(),
topIterator?.[disposablestack_1.DisposableSymbols.asyncDispose]?.(),
]);
},
};
}
exports.flattenAsyncIterable = flattenAsyncIterable;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.invariant = void 0;
exports.invariant = invariant;
function invariant(condition, message) {

@@ -9,2 +9,1 @@ if (!condition) {

}
exports.invariant = invariant;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizedExecutor = void 0;
exports.normalizedExecutor = normalizedExecutor;
const graphql_1 = require("graphql");

@@ -24,2 +24,1 @@ const value_or_promise_1 = require("value-or-promise");

}
exports.normalizedExecutor = normalizedExecutor;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.promiseForObject = void 0;
exports.promiseForObject = promiseForObject;
/**

@@ -23,2 +23,1 @@ * This function transforms a JS object `Record<string, Promise<T>>` into

}
exports.promiseForObject = promiseForObject;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVariableValues = void 0;
exports.getVariableValues = getVariableValues;
const graphql_1 = require("graphql");

@@ -32,6 +32,4 @@ const utils_1 = require("@graphql-tools/utils");

}
// @ts-expect-error - We know that errors is an array of GraphQLError.
return { errors };
}
exports.getVariableValues = getVariableValues;
function coerceVariableValues(schema, varDefNodes, inputs, onError) {

@@ -38,0 +36,0 @@ const coercedValues = {};

import { assertValidSchema, getDirectiveValues, GraphQLError, isAbstractType, isLeafType, isListType, isNonNullType, isObjectType, Kind, locatedError, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, versionInfo, } from 'graphql';
import { ValueOrPromise } from 'value-or-promise';
import { collectSubFields as _collectSubfields, addPath, collectFields, createGraphQLError, fakePromise, getArgumentValues, getDefinedRootType, GraphQLStreamDirective, inspect, isAsyncIterable, isIterableObject, isObjectLike, isPromise, mapAsyncIterator, memoize1, memoize3, pathToArray, promiseReduce, } from '@graphql-tools/utils';
import { DisposableSymbols } from '@whatwg-node/disposablestack';
import { coerceError } from './coerceError.js';

@@ -846,2 +847,6 @@ import { flattenAsyncIterable } from './flattenAsyncIterable.js';

},
[DisposableSymbols.asyncDispose]() {
done = true;
return subsequentIterator?.[DisposableSymbols.asyncDispose]?.();
},
};

@@ -1227,2 +1232,6 @@ }

},
async [DisposableSymbols.asyncDispose]() {
await returnStreamIterators();
isDone = true;
},
};

@@ -1229,0 +1238,0 @@ }

@@ -0,1 +1,2 @@

import { DisposableSymbols } from '@whatwg-node/disposablestack';
/**

@@ -84,3 +85,10 @@ * Given an AsyncIterable of AsyncIterables, flatten all yielded results into a

},
async [DisposableSymbols.asyncDispose]() {
done = true;
await Promise.all([
currentNestedIterator?.[DisposableSymbols.asyncDispose]?.(),
topIterator?.[DisposableSymbols.asyncDispose]?.(),
]);
},
};
}

@@ -29,3 +29,2 @@ import { coerceInputValue, isInputType, isNonNullType, print, typeFromAST, valueFromAST, } from 'graphql';

}
// @ts-expect-error - We know that errors is an array of GraphQLError.
return { errors };

@@ -32,0 +31,0 @@ }

{
"name": "@graphql-tools/executor",
"version": "1.3.6",
"version": "1.3.7-alpha-20241209101052-b0932c49214ceb915e4bebbab82ae2fee9dfba47",
"sideEffects": false,

@@ -10,4 +10,5 @@ "peerDependencies": {

"@graphql-tools/utils": "^10.6.2",
"@graphql-typed-document-node/core": "3.2.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@repeaterjs/repeater": "^3.0.4",
"@whatwg-node/disposablestack": "^0.0.5",
"tslib": "^2.4.0",

@@ -14,0 +15,0 @@ "value-or-promise": "^1.0.12"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc