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

@graphql-tools/executor

Package Overview
Dependencies
Maintainers
3
Versions
343
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.2.5 to 1.2.6-alpha-20240408104556-2aa181653bea4c5ee87f6cd99263dee40fa63a5b

cjs/execution/coerceError.js

19

cjs/execution/execute.js

@@ -7,2 +7,3 @@ "use strict";

const utils_1 = require("@graphql-tools/utils");
const coerceError_js_1 = require("./coerceError.js");
const flattenAsyncIterable_js_1 = require("./flattenAsyncIterable.js");

@@ -331,2 +332,3 @@ const invariant_js_1 = require("./invariant.js");

return completed.then(undefined, rawError => {
rawError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(path));

@@ -341,3 +343,4 @@ const handledError = handleFieldError(error, returnType, errors);

catch (rawError) {
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(path));
const coercedError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(coercedError, fieldNodes, (0, utils_1.pathToArray)(path));
const handledError = handleFieldError(error, returnType, errors);

@@ -494,3 +497,4 @@ filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);

catch (rawError) {
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const coercedError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(coercedError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
completedResults.push(handleFieldError(error, itemType, errors));

@@ -561,2 +565,3 @@ break;

completedResults.push(completedItem.then(undefined, rawError => {
rawError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));

@@ -572,3 +577,4 @@ const handledError = handleFieldError(error, itemType, errors);

catch (rawError) {
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const coercedError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(coercedError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const handledError = handleFieldError(error, itemType, errors);

@@ -978,2 +984,3 @@ filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);

completedItem = completedItem.then(undefined, rawError => {
rawError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));

@@ -987,3 +994,4 @@ const handledError = handleFieldError(error, itemType, asyncPayloadRecord.errors);

catch (rawError) {
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const coercedError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(coercedError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
completedItem = handleFieldError(error, itemType, asyncPayloadRecord.errors);

@@ -1024,3 +1032,4 @@ filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);

catch (rawError) {
const error = (0, graphql_1.locatedError)(rawError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const coercedError = (0, coerceError_js_1.coerceError)(rawError);
const error = (0, graphql_1.locatedError)(coercedError, fieldNodes, (0, utils_1.pathToArray)(itemPath));
const value = handleFieldError(error, itemType, asyncPayloadRecord.errors);

@@ -1027,0 +1036,0 @@ // don't continue if iterator throws

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

@@ -323,2 +324,3 @@ import { invariant } from './invariant.js';

return completed.then(undefined, rawError => {
rawError = coerceError(rawError);
const error = locatedError(rawError, fieldNodes, pathToArray(path));

@@ -333,3 +335,4 @@ const handledError = handleFieldError(error, returnType, errors);

catch (rawError) {
const error = locatedError(rawError, fieldNodes, pathToArray(path));
const coercedError = coerceError(rawError);
const error = locatedError(coercedError, fieldNodes, pathToArray(path));
const handledError = handleFieldError(error, returnType, errors);

@@ -485,3 +488,4 @@ filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);

catch (rawError) {
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
const coercedError = coerceError(rawError);
const error = locatedError(coercedError, fieldNodes, pathToArray(itemPath));
completedResults.push(handleFieldError(error, itemType, errors));

@@ -552,2 +556,3 @@ break;

completedResults.push(completedItem.then(undefined, rawError => {
rawError = coerceError(rawError);
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));

@@ -563,3 +568,4 @@ const handledError = handleFieldError(error, itemType, errors);

catch (rawError) {
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
const coercedError = coerceError(rawError);
const error = locatedError(coercedError, fieldNodes, pathToArray(itemPath));
const handledError = handleFieldError(error, itemType, errors);

@@ -965,2 +971,3 @@ filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);

completedItem = completedItem.then(undefined, rawError => {
rawError = coerceError(rawError);
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));

@@ -974,3 +981,4 @@ const handledError = handleFieldError(error, itemType, asyncPayloadRecord.errors);

catch (rawError) {
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
const coercedError = coerceError(rawError);
const error = locatedError(coercedError, fieldNodes, pathToArray(itemPath));
completedItem = handleFieldError(error, itemType, asyncPayloadRecord.errors);

@@ -1011,3 +1019,4 @@ filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);

catch (rawError) {
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
const coercedError = coerceError(rawError);
const error = locatedError(coercedError, fieldNodes, pathToArray(itemPath));
const value = handleFieldError(error, itemType, asyncPayloadRecord.errors);

@@ -1014,0 +1023,0 @@ // don't continue if iterator throws

{
"name": "@graphql-tools/executor",
"version": "1.2.5",
"version": "1.2.6-alpha-20240408104556-2aa181653bea4c5ee87f6cd99263dee40fa63a5b",
"sideEffects": false,

@@ -5,0 +5,0 @@ "peerDependencies": {

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