@graphql-tools/executor
Advanced tools
Comparing version 0.0.1-alpha-20221025161341-67605d5d to 0.0.1-alpha-20221025161810-24ba2b78
@@ -177,7 +177,7 @@ "use strict"; | ||
switch (operation.operation) { | ||
case graphql_1.OperationTypeNode.QUERY: | ||
case 'query': | ||
return executeFields(exeContext, rootType, rootValue, path, rootFields); | ||
case graphql_1.OperationTypeNode.MUTATION: | ||
case 'mutation': | ||
return executeFieldsSerially(exeContext, rootType, rootValue, path, rootFields); | ||
case graphql_1.OperationTypeNode.SUBSCRIPTION: | ||
case 'subscription': | ||
// TODO: deprecate `subscribe` and move all logic here | ||
@@ -187,2 +187,3 @@ // Temporary solution until we finish merging execute and subscribe together | ||
} | ||
throw new Error(`Can only execute queries, mutations and subscriptions, got "${operation.operation}".`); | ||
} | ||
@@ -189,0 +190,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { locatedError, OperationTypeNode, Kind, isAbstractType, isLeafType, isListType, isNonNullType, isObjectType, assertValidSchema, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, } from 'graphql'; | ||
import { locatedError, Kind, isAbstractType, isLeafType, isListType, isNonNullType, isObjectType, assertValidSchema, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, } from 'graphql'; | ||
import { getVariableValues } from './values.js'; | ||
@@ -170,7 +170,7 @@ import { addPath, collectFields, collectSubFields, createGraphQLError, getArgumentValues, getRootTypeMap, inspect, isAsyncIterable, isIterableObject, isObjectLike, isPromise, mapAsyncIterator, pathToArray, promiseReduce, } from '@graphql-tools/utils'; | ||
switch (operation.operation) { | ||
case OperationTypeNode.QUERY: | ||
case 'query': | ||
return executeFields(exeContext, rootType, rootValue, path, rootFields); | ||
case OperationTypeNode.MUTATION: | ||
case 'mutation': | ||
return executeFieldsSerially(exeContext, rootType, rootValue, path, rootFields); | ||
case OperationTypeNode.SUBSCRIPTION: | ||
case 'subscription': | ||
// TODO: deprecate `subscribe` and move all logic here | ||
@@ -180,2 +180,3 @@ // Temporary solution until we finish merging execute and subscribe together | ||
} | ||
throw new Error(`Can only execute queries, mutations and subscriptions, got "${operation.operation}".`); | ||
} | ||
@@ -182,0 +183,0 @@ /** |
{ | ||
"name": "@graphql-tools/executor", | ||
"version": "0.0.1-alpha-20221025161341-67605d5d", | ||
"version": "0.0.1-alpha-20221025161810-24ba2b78", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123277
2306