@graphitation/supermassive 3.2.7 → 3.3.0

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.
Files changed (63) hide show
  1. package/.eslintcache +1 -1
  2. package/CHANGELOG.md +10 -2
  3. package/lib/IncrementalPublisher.d.ts +131 -0
  4. package/lib/IncrementalPublisher.d.ts.map +1 -0
  5. package/lib/IncrementalPublisher.js +519 -0
  6. package/lib/IncrementalPublisher.js.map +7 -0
  7. package/lib/IncrementalPublisher.mjs +503 -0
  8. package/lib/IncrementalPublisher.mjs.map +7 -0
  9. package/lib/benchmarks/swapi-schema/resolvers.d.ts.map +1 -1
  10. package/lib/benchmarks/swapi-schema/resolvers.js +25 -0
  11. package/lib/benchmarks/swapi-schema/resolvers.js.map +2 -2
  12. package/lib/benchmarks/swapi-schema/resolvers.mjs +25 -0
  13. package/lib/benchmarks/swapi-schema/resolvers.mjs.map +2 -2
  14. package/lib/buildFieldPlan.d.ts +18 -0
  15. package/lib/buildFieldPlan.d.ts.map +1 -0
  16. package/lib/buildFieldPlan.js +120 -0
  17. package/lib/buildFieldPlan.js.map +7 -0
  18. package/lib/buildFieldPlan.mjs +101 -0
  19. package/lib/buildFieldPlan.mjs.map +7 -0
  20. package/lib/collectFields.d.ts +21 -8
  21. package/lib/collectFields.d.ts.map +1 -1
  22. package/lib/collectFields.js +97 -95
  23. package/lib/collectFields.js.map +2 -2
  24. package/lib/collectFields.mjs +97 -95
  25. package/lib/collectFields.mjs.map +2 -2
  26. package/lib/executeWithoutSchema.d.ts +6 -50
  27. package/lib/executeWithoutSchema.d.ts.map +1 -1
  28. package/lib/executeWithoutSchema.js +603 -485
  29. package/lib/executeWithoutSchema.js.map +3 -3
  30. package/lib/executeWithoutSchema.mjs +614 -486
  31. package/lib/executeWithoutSchema.mjs.map +3 -3
  32. package/lib/index.d.ts +1 -1
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js.map +1 -1
  35. package/lib/index.mjs.map +1 -1
  36. package/lib/jsutils/getBySet.d.ts +2 -0
  37. package/lib/jsutils/getBySet.d.ts.map +1 -0
  38. package/lib/jsutils/getBySet.js +32 -0
  39. package/lib/jsutils/getBySet.js.map +7 -0
  40. package/lib/jsutils/getBySet.mjs +13 -0
  41. package/lib/jsutils/getBySet.mjs.map +7 -0
  42. package/lib/jsutils/isSameSet.d.ts +2 -0
  43. package/lib/jsutils/isSameSet.d.ts.map +1 -0
  44. package/lib/jsutils/isSameSet.js +34 -0
  45. package/lib/jsutils/isSameSet.js.map +7 -0
  46. package/lib/jsutils/isSameSet.mjs +15 -0
  47. package/lib/jsutils/isSameSet.mjs.map +7 -0
  48. package/lib/jsutils/promiseWithResolvers.d.ts +11 -0
  49. package/lib/jsutils/promiseWithResolvers.d.ts.map +1 -0
  50. package/lib/jsutils/promiseWithResolvers.js +32 -0
  51. package/lib/jsutils/promiseWithResolvers.js.map +7 -0
  52. package/lib/jsutils/promiseWithResolvers.mjs +13 -0
  53. package/lib/jsutils/promiseWithResolvers.mjs.map +7 -0
  54. package/lib/types.d.ts +63 -27
  55. package/lib/types.d.ts.map +1 -1
  56. package/lib/types.js.map +1 -1
  57. package/lib/values.d.ts +5 -4
  58. package/lib/values.d.ts.map +1 -1
  59. package/lib/values.js +13 -8
  60. package/lib/values.js.map +2 -2
  61. package/lib/values.mjs +13 -8
  62. package/lib/values.mjs.map +2 -2
  63. package/package.json +1 -1
package/lib/values.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/values.ts"],
4
- "sourcesContent": ["import {\n GraphQLError,\n Kind,\n print,\n locatedError,\n DirectiveNode,\n FieldNode,\n VariableDefinitionNode,\n} from \"graphql\";\nimport { inspect } from \"./jsutils/inspect\";\nimport { printPathArray } from \"./jsutils/printPathArray\";\nimport { ExecutionContext } from \"./executeWithoutSchema\";\nimport {\n DirectiveDefinitionTuple,\n FieldDefinition,\n getFieldArguments,\n getDirectiveName,\n getInputDefaultValue,\n getInputValueTypeReference,\n isDefined,\n isInputType,\n getDirectiveArguments,\n} from \"./schema/definition\";\nimport { valueFromAST } from \"./utilities/valueFromAST\";\nimport { coerceInputValue } from \"./utilities/coerceInputValue\";\nimport {\n inspectTypeReference,\n isNonNullType,\n typeReferenceFromNode,\n} from \"./schema/reference\";\nimport type { SchemaFragment } from \"./types\";\n\ntype CoercedVariableValues =\n | { errors: Array<GraphQLError>; coerced?: never }\n | { coerced: { [variable: string]: unknown }; errors?: never };\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n options?: { maxErrors?: number },\n): CoercedVariableValues {\n const errors: GraphQLError[] = [];\n const maxErrors = options?.maxErrors;\n try {\n const coerced = coerceVariableValues(\n schemaFragment,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw locatedError(\n \"Too many errors processing variables, error limit reached. Execution aborted.\",\n [],\n );\n }\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return { coerced };\n }\n } catch (error) {\n errors.push(error as GraphQLError);\n }\n\n return { errors: errors };\n}\n\nfunction coerceVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n onError: (error: GraphQLError) => void,\n): { [variable: string]: unknown } {\n const coercedValues: { [variable: string]: unknown } = {};\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varTypeReference = typeReferenceFromNode(varDefNode.type);\n\n if (!isInputType(schemaFragment.definitions, varTypeReference)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n [varDefNode.type],\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(\n varDefNode.defaultValue,\n varTypeReference,\n schemaFragment,\n );\n } else if (isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n [varDefNode],\n ),\n );\n }\n continue;\n }\n\n const value = inputs[varName];\n if (value === null && isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n [varDefNode],\n ),\n );\n continue;\n }\n\n coercedValues[varName] = coerceInputValue(\n value,\n varTypeReference,\n schemaFragment,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` + inspect(invalidValue);\n if (path.length > 0) {\n prefix += ` at \"${varName}${printPathArray(path)}\"`;\n }\n onError(locatedError(prefix + \"; \" + error.message, [varDefNode]));\n },\n );\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getArgumentValues(\n exeContext: ExecutionContext,\n def: FieldDefinition | DirectiveDefinitionTuple,\n node: FieldNode | DirectiveNode,\n): { [argument: string]: unknown } {\n const definitions = exeContext.schemaFragment.definitions;\n const coercedValues: { [argument: string]: unknown } = {};\n const argumentDefs =\n node.kind === Kind.FIELD\n ? getFieldArguments(def as FieldDefinition)\n : getDirectiveArguments(def as DirectiveDefinitionTuple);\n if (!argumentDefs) {\n return coercedValues;\n }\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const argumentNodes = node.arguments ?? [];\n const argNodeMap = new Map(argumentNodes.map((arg) => [arg.name.value, arg]));\n\n for (const [name, argumentDef] of Object.entries(argumentDefs)) {\n const argumentNode = argNodeMap.get(name);\n const argumentTypeRef = getInputValueTypeReference(argumentDef);\n const defaultValue = getInputDefaultValue(argumentDef);\n\n if (argumentNode == null) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" was not provided.`,\n [node],\n );\n }\n continue;\n }\n\n if (!isDefined(definitions, argumentTypeRef)) {\n throw locatedError(\n `Could not find type for argument ${name} in ${node.kind} ${node.name.value}`,\n [argumentNode],\n );\n }\n\n // if (!schemaTypes.isInputType(argumentTypeRef)) {\n // const type = schemaTypes.printTypeRef(argumentTypeRef);\n // throw locatedError(\n // `Argument \"$${name}\" expected value of type \"${type}\" which cannot be used as an input type.`,\n // [argumentNode],\n // );\n // }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n if (\n exeContext.variableValues == null ||\n !hasOwnProperty(exeContext.variableValues, variableName)\n ) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n [valueNode],\n );\n }\n continue;\n }\n isNull = exeContext.variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of non-null type \"${type}\" must not be null.\"`,\n [valueNode],\n );\n }\n\n const coercedValue = valueFromAST(\n valueNode,\n argumentTypeRef,\n exeContext.schemaFragment,\n exeContext.variableValues,\n );\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw locatedError(\n `Argument \"${name}\" has invalid value ${print(valueNode)}.`,\n [valueNode],\n );\n }\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nexport function getDirectiveValues(\n exeContext: ExecutionContext,\n directiveDef: DirectiveDefinitionTuple,\n node: { directives?: ReadonlyArray<DirectiveNode> },\n): undefined | { [argument: string]: unknown } {\n const name = getDirectiveName(directiveDef);\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const directiveNode = node.directives?.find(\n (directive) => directive.name.value === name,\n );\n\n if (directiveNode) {\n return getArgumentValues(exeContext, directiveDef, directiveNode);\n }\n}\n\nfunction hasOwnProperty(obj: unknown, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQO;AACP,qBAAwB;AACxB,4BAA+B;AAE/B,wBAUO;AACP,0BAA6B;AAC7B,8BAAiC;AACjC,uBAIO;AAkBA,SAAS,kBACd,gBACA,aACA,QACA,SACuB;AACvB,QAAM,SAAyB,CAAC;AAChC,QAAM,YAAY,mCAAS;AAC3B,MAAI;AACF,UAAM,UAAU;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC,UAAU;AACT,YAAI,aAAa,QAAQ,OAAO,UAAU,WAAW;AACnD,oBAAM;AAAA,YACJ;AAAA,YACA,CAAC;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QLError,\n Kind,\n print,\n locatedError,\n DirectiveNode,\n FieldNode,\n VariableDefinitionNode,\n} from \"graphql\";\nimport { inspect } from \"./jsutils/inspect\";\nimport { printPathArray } from \"./jsutils/printPathArray\";\nimport {\n DirectiveDefinitionTuple,\n FieldDefinition,\n getFieldArguments,\n getDirectiveName,\n getInputDefaultValue,\n getInputValueTypeReference,\n isDefined,\n isInputType,\n getDirectiveArguments,\n} from \"./schema/definition\";\nimport { valueFromAST } from \"./utilities/valueFromAST\";\nimport { coerceInputValue } from \"./utilities/coerceInputValue\";\nimport {\n inspectTypeReference,\n isNonNullType,\n typeReferenceFromNode,\n} from \"./schema/reference\";\nimport type { SchemaFragment } from \"./types\";\nimport { Maybe } from \"./jsutils/Maybe\";\nimport { ObjMap } from \"./jsutils/ObjMap\";\n\ntype CoercedVariableValues =\n | { errors: Array<GraphQLError>; coerced?: never }\n | { coerced: { [variable: string]: unknown }; errors?: never };\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n options?: { maxErrors?: number },\n): CoercedVariableValues {\n const errors: GraphQLError[] = [];\n const maxErrors = options?.maxErrors;\n try {\n const coerced = coerceVariableValues(\n schemaFragment,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw locatedError(\n \"Too many errors processing variables, error limit reached. Execution aborted.\",\n [],\n );\n }\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return { coerced };\n }\n } catch (error) {\n errors.push(error as GraphQLError);\n }\n\n return { errors: errors };\n}\n\nfunction coerceVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n onError: (error: GraphQLError) => void,\n): { [variable: string]: unknown } {\n const coercedValues: { [variable: string]: unknown } = {};\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varTypeReference = typeReferenceFromNode(varDefNode.type);\n\n if (!isInputType(schemaFragment.definitions, varTypeReference)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n [varDefNode.type],\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(\n varDefNode.defaultValue,\n varTypeReference,\n schemaFragment,\n );\n } else if (isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n [varDefNode],\n ),\n );\n }\n continue;\n }\n\n const value = inputs[varName];\n if (value === null && isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n [varDefNode],\n ),\n );\n continue;\n }\n\n coercedValues[varName] = coerceInputValue(\n value,\n varTypeReference,\n schemaFragment,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` + inspect(invalidValue);\n if (path.length > 0) {\n prefix += ` at \"${varName}${printPathArray(path)}\"`;\n }\n onError(locatedError(prefix + \"; \" + error.message, [varDefNode]));\n },\n );\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getArgumentValues(\n schemaFragment: SchemaFragment,\n def: FieldDefinition | DirectiveDefinitionTuple,\n node: FieldNode | DirectiveNode,\n variableValues?: Maybe<ObjMap<unknown>>,\n): { [argument: string]: unknown } {\n const definitions = schemaFragment.definitions;\n const coercedValues: { [argument: string]: unknown } = {};\n const argumentDefs =\n node.kind === Kind.FIELD\n ? getFieldArguments(def as FieldDefinition)\n : getDirectiveArguments(def as DirectiveDefinitionTuple);\n if (!argumentDefs) {\n return coercedValues;\n }\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const argumentNodes = node.arguments ?? [];\n const argNodeMap = new Map(argumentNodes.map((arg) => [arg.name.value, arg]));\n\n for (const [name, argumentDef] of Object.entries(argumentDefs)) {\n const argumentNode = argNodeMap.get(name);\n const argumentTypeRef = getInputValueTypeReference(argumentDef);\n const defaultValue = getInputDefaultValue(argumentDef);\n\n if (argumentNode == null) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" was not provided.`,\n [node],\n );\n }\n continue;\n }\n\n if (!isDefined(definitions, argumentTypeRef)) {\n throw locatedError(\n `Could not find type for argument ${name} in ${node.kind} ${node.name.value}`,\n [argumentNode],\n );\n }\n\n // if (!schemaTypes.isInputType(argumentTypeRef)) {\n // const type = schemaTypes.printTypeRef(argumentTypeRef);\n // throw locatedError(\n // `Argument \"$${name}\" expected value of type \"${type}\" which cannot be used as an input type.`,\n // [argumentNode],\n // );\n // }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n if (\n variableValues == null ||\n !hasOwnProperty(variableValues, variableName)\n ) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n [valueNode],\n );\n }\n continue;\n }\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of non-null type \"${type}\" must not be null.\"`,\n [valueNode],\n );\n }\n\n const coercedValue = valueFromAST(\n valueNode,\n argumentTypeRef,\n schemaFragment,\n variableValues,\n );\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw locatedError(\n `Argument \"${name}\" has invalid value ${print(valueNode)}.`,\n [valueNode],\n );\n }\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nexport function getDirectiveValues(\n schemaFragment: SchemaFragment,\n directiveDef: DirectiveDefinitionTuple,\n node: { directives?: ReadonlyArray<DirectiveNode> },\n variableValues?: Maybe<ObjMap<unknown>>,\n): undefined | { [argument: string]: unknown } {\n const name = getDirectiveName(directiveDef);\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const directiveNode = node.directives?.find(\n (directive) => directive.name.value === name,\n );\n\n if (directiveNode) {\n return getArgumentValues(\n schemaFragment,\n directiveDef,\n directiveNode,\n variableValues,\n );\n }\n}\n\nfunction hasOwnProperty(obj: unknown, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQO;AACP,qBAAwB;AACxB,4BAA+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AAO,oCAAiB,YAAY;AAG1C,QAAM,iBAAgB,UAAK,eAAL,mBAAiB;AAAA,IACrC,CAAC,cAAc,UAAU,KAAK,UAAU;AAAA;AAG1C,MAAI,eAAe;AACjB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,eAAe,KAAc,MAAuB;AAC3D,SAAO,OAAO,UAAU,eAAe,KAAK,KAAK,IAAI;AACvD;",
6
6
  "names": []
7
7
  }
package/lib/values.mjs CHANGED
@@ -107,9 +107,9 @@ function coerceVariableValues(schemaFragment, varDefNodes, inputs, onError) {
107
107
  }
108
108
  return coercedValues;
109
109
  }
110
- function getArgumentValues(exeContext, def, node) {
110
+ function getArgumentValues(schemaFragment, def, node, variableValues) {
111
111
  var _a;
112
- const definitions = exeContext.schemaFragment.definitions;
112
+ const definitions = schemaFragment.definitions;
113
113
  const coercedValues = {};
114
114
  const argumentDefs = node.kind === Kind.FIELD ? getFieldArguments(def) : getDirectiveArguments(def);
115
115
  if (!argumentDefs) {
@@ -143,7 +143,7 @@ function getArgumentValues(exeContext, def, node) {
143
143
  let isNull = valueNode.kind === Kind.NULL;
144
144
  if (valueNode.kind === Kind.VARIABLE) {
145
145
  const variableName = valueNode.name.value;
146
- if (exeContext.variableValues == null || !hasOwnProperty(exeContext.variableValues, variableName)) {
146
+ if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {
147
147
  if (defaultValue !== void 0) {
148
148
  coercedValues[name] = defaultValue;
149
149
  } else if (isNonNullType(argumentTypeRef)) {
@@ -155,7 +155,7 @@ function getArgumentValues(exeContext, def, node) {
155
155
  }
156
156
  continue;
157
157
  }
158
- isNull = exeContext.variableValues[variableName] == null;
158
+ isNull = variableValues[variableName] == null;
159
159
  }
160
160
  if (isNull && isNonNullType(argumentTypeRef)) {
161
161
  const type = inspectTypeReference(argumentTypeRef);
@@ -167,8 +167,8 @@ function getArgumentValues(exeContext, def, node) {
167
167
  const coercedValue = valueFromAST(
168
168
  valueNode,
169
169
  argumentTypeRef,
170
- exeContext.schemaFragment,
171
- exeContext.variableValues
170
+ schemaFragment,
171
+ variableValues
172
172
  );
173
173
  if (coercedValue === void 0) {
174
174
  throw locatedError(
@@ -180,14 +180,19 @@ function getArgumentValues(exeContext, def, node) {
180
180
  }
181
181
  return coercedValues;
182
182
  }
183
- function getDirectiveValues(exeContext, directiveDef, node) {
183
+ function getDirectiveValues(schemaFragment, directiveDef, node, variableValues) {
184
184
  var _a;
185
185
  const name = getDirectiveName(directiveDef);
186
186
  const directiveNode = (_a = node.directives) == null ? void 0 : _a.find(
187
187
  (directive) => directive.name.value === name
188
188
  );
189
189
  if (directiveNode) {
190
- return getArgumentValues(exeContext, directiveDef, directiveNode);
190
+ return getArgumentValues(
191
+ schemaFragment,
192
+ directiveDef,
193
+ directiveNode,
194
+ variableValues
195
+ );
191
196
  }
192
197
  }
193
198
  function hasOwnProperty(obj, prop) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/values.ts"],
4
- "sourcesContent": ["import {\n GraphQLError,\n Kind,\n print,\n locatedError,\n DirectiveNode,\n FieldNode,\n VariableDefinitionNode,\n} from \"graphql\";\nimport { inspect } from \"./jsutils/inspect\";\nimport { printPathArray } from \"./jsutils/printPathArray\";\nimport { ExecutionContext } from \"./executeWithoutSchema\";\nimport {\n DirectiveDefinitionTuple,\n FieldDefinition,\n getFieldArguments,\n getDirectiveName,\n getInputDefaultValue,\n getInputValueTypeReference,\n isDefined,\n isInputType,\n getDirectiveArguments,\n} from \"./schema/definition\";\nimport { valueFromAST } from \"./utilities/valueFromAST\";\nimport { coerceInputValue } from \"./utilities/coerceInputValue\";\nimport {\n inspectTypeReference,\n isNonNullType,\n typeReferenceFromNode,\n} from \"./schema/reference\";\nimport type { SchemaFragment } from \"./types\";\n\ntype CoercedVariableValues =\n | { errors: Array<GraphQLError>; coerced?: never }\n | { coerced: { [variable: string]: unknown }; errors?: never };\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n options?: { maxErrors?: number },\n): CoercedVariableValues {\n const errors: GraphQLError[] = [];\n const maxErrors = options?.maxErrors;\n try {\n const coerced = coerceVariableValues(\n schemaFragment,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw locatedError(\n \"Too many errors processing variables, error limit reached. Execution aborted.\",\n [],\n );\n }\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return { coerced };\n }\n } catch (error) {\n errors.push(error as GraphQLError);\n }\n\n return { errors: errors };\n}\n\nfunction coerceVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n onError: (error: GraphQLError) => void,\n): { [variable: string]: unknown } {\n const coercedValues: { [variable: string]: unknown } = {};\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varTypeReference = typeReferenceFromNode(varDefNode.type);\n\n if (!isInputType(schemaFragment.definitions, varTypeReference)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n [varDefNode.type],\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(\n varDefNode.defaultValue,\n varTypeReference,\n schemaFragment,\n );\n } else if (isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n [varDefNode],\n ),\n );\n }\n continue;\n }\n\n const value = inputs[varName];\n if (value === null && isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n [varDefNode],\n ),\n );\n continue;\n }\n\n coercedValues[varName] = coerceInputValue(\n value,\n varTypeReference,\n schemaFragment,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` + inspect(invalidValue);\n if (path.length > 0) {\n prefix += ` at \"${varName}${printPathArray(path)}\"`;\n }\n onError(locatedError(prefix + \"; \" + error.message, [varDefNode]));\n },\n );\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getArgumentValues(\n exeContext: ExecutionContext,\n def: FieldDefinition | DirectiveDefinitionTuple,\n node: FieldNode | DirectiveNode,\n): { [argument: string]: unknown } {\n const definitions = exeContext.schemaFragment.definitions;\n const coercedValues: { [argument: string]: unknown } = {};\n const argumentDefs =\n node.kind === Kind.FIELD\n ? getFieldArguments(def as FieldDefinition)\n : getDirectiveArguments(def as DirectiveDefinitionTuple);\n if (!argumentDefs) {\n return coercedValues;\n }\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const argumentNodes = node.arguments ?? [];\n const argNodeMap = new Map(argumentNodes.map((arg) => [arg.name.value, arg]));\n\n for (const [name, argumentDef] of Object.entries(argumentDefs)) {\n const argumentNode = argNodeMap.get(name);\n const argumentTypeRef = getInputValueTypeReference(argumentDef);\n const defaultValue = getInputDefaultValue(argumentDef);\n\n if (argumentNode == null) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" was not provided.`,\n [node],\n );\n }\n continue;\n }\n\n if (!isDefined(definitions, argumentTypeRef)) {\n throw locatedError(\n `Could not find type for argument ${name} in ${node.kind} ${node.name.value}`,\n [argumentNode],\n );\n }\n\n // if (!schemaTypes.isInputType(argumentTypeRef)) {\n // const type = schemaTypes.printTypeRef(argumentTypeRef);\n // throw locatedError(\n // `Argument \"$${name}\" expected value of type \"${type}\" which cannot be used as an input type.`,\n // [argumentNode],\n // );\n // }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n if (\n exeContext.variableValues == null ||\n !hasOwnProperty(exeContext.variableValues, variableName)\n ) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n [valueNode],\n );\n }\n continue;\n }\n isNull = exeContext.variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of non-null type \"${type}\" must not be null.\"`,\n [valueNode],\n );\n }\n\n const coercedValue = valueFromAST(\n valueNode,\n argumentTypeRef,\n exeContext.schemaFragment,\n exeContext.variableValues,\n );\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw locatedError(\n `Argument \"${name}\" has invalid value ${print(valueNode)}.`,\n [valueNode],\n );\n }\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nexport function getDirectiveValues(\n exeContext: ExecutionContext,\n directiveDef: DirectiveDefinitionTuple,\n node: { directives?: ReadonlyArray<DirectiveNode> },\n): undefined | { [argument: string]: unknown } {\n const name = getDirectiveName(directiveDef);\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const directiveNode = node.directives?.find(\n (directive) => directive.name.value === name,\n );\n\n if (directiveNode) {\n return getArgumentValues(exeContext, directiveDef, directiveNode);\n }\n}\n\nfunction hasOwnProperty(obj: unknown, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n"],
5
- "mappings": ";AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAE/B;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkBA,SAAS,kBACd,gBACA,aACA,QACA,SACuB;AACvB,QAAM,SAAyB,CAAC;AAChC,QAAM,YAAY,mCAAS;AAC3B,MAAI;AACF,UAAM,UAAU;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,CAAC,UAAU;AACT,YAAI,aAAa,QAAQ,OAAO,UAAU,WAAW;AACnD,gBAAM;AAAA,YACJ;AAAA,YACA,CAAC;AAAA,UACH;AAAA,QACF;AACA,eAAO,KAAK,KAAK;AAAA,MACnB;AAAA,IACF;AAEA,QAAI,OAAO,WAAW,GAAG;AACvB,aAAO,EAAE,QAAQ;AAAA,IACnB;AAAA,EACF,SAAS,OAAP;AACA,WAAO,KAAK,KAAqB;AAAA,EACnC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,IAAI,IAAI;AAAA,QACxB,WAAW,cAAc,eAAe,GAAG;AACzC,gBAAM,OAAO,qBAAqB,eAAe;AACjD,gBAAM;AAAA,YACJ,aAAa,2BAA2B,qCACP;AAAA,YACjC,CAAC,SAAS;AAAA,UACZ;AAAA,QACF;AACA;AAAA,MACF;AACA,eAAS,WAAW,eAAe,YAAY,KAAK;AAAA,IACtD;AAEA,QAAI,UAAU,cAAc,eAAe,GAAG;AAC5C,YAAM,OAAO,qBAAqB,eAAe;AACjD,YAAM;AAAA,QACJ,aAAa,2BAA2B;AAAA,QACxC,CAAC,SAAS;AAAA,MACZ;AAAA,IACF;AAEA,UAAM,eAAe;AAAA,MACnB;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AACA,QAAI,iBAAiB,QAAW;AAI9B,YAAM;AAAA,QACJ,aAAa,2BAA2B,MAAM,SAAS;AAAA,QACvD,CAAC,SAAS;AAAA,MACZ;AAAA,IACF;AACA,kBAAc,IAAI,IAAI;AAAA,EACxB;AAEA,SAAO;AACT;AAaO,SAAS,mBACd,YACA,cACA,MAC6C;AA3R/C;AA4RE,QAAM,OAAO,iBAAiB,YAAY;AAG1C,QAAM,iBAAgB,UAAK,eAAL,mBAAiB;AAAA,IACrC,CAAC,cAAc,UAAU,KAAK,UAAU;AAAA;AAG1C,MAAI,eAAe;AACjB,WAAO,kBAAkB,YAAY,cAAc,aAAa;AAAA,EAClE;AACF;AAEA,SAAS,eAAe,KAAc,MAAuB;AAC3D,SAAO,OAAO,UAAU,eAAe,KAAK,KAAK,IAAI;AACvD;",
4
+ "sourcesContent": ["import {\n GraphQLError,\n Kind,\n print,\n locatedError,\n DirectiveNode,\n FieldNode,\n VariableDefinitionNode,\n} from \"graphql\";\nimport { inspect } from \"./jsutils/inspect\";\nimport { printPathArray } from \"./jsutils/printPathArray\";\nimport {\n DirectiveDefinitionTuple,\n FieldDefinition,\n getFieldArguments,\n getDirectiveName,\n getInputDefaultValue,\n getInputValueTypeReference,\n isDefined,\n isInputType,\n getDirectiveArguments,\n} from \"./schema/definition\";\nimport { valueFromAST } from \"./utilities/valueFromAST\";\nimport { coerceInputValue } from \"./utilities/coerceInputValue\";\nimport {\n inspectTypeReference,\n isNonNullType,\n typeReferenceFromNode,\n} from \"./schema/reference\";\nimport type { SchemaFragment } from \"./types\";\nimport { Maybe } from \"./jsutils/Maybe\";\nimport { ObjMap } from \"./jsutils/ObjMap\";\n\ntype CoercedVariableValues =\n | { errors: Array<GraphQLError>; coerced?: never }\n | { coerced: { [variable: string]: unknown }; errors?: never };\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n options?: { maxErrors?: number },\n): CoercedVariableValues {\n const errors: GraphQLError[] = [];\n const maxErrors = options?.maxErrors;\n try {\n const coerced = coerceVariableValues(\n schemaFragment,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw locatedError(\n \"Too many errors processing variables, error limit reached. Execution aborted.\",\n [],\n );\n }\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return { coerced };\n }\n } catch (error) {\n errors.push(error as GraphQLError);\n }\n\n return { errors: errors };\n}\n\nfunction coerceVariableValues(\n schemaFragment: SchemaFragment,\n varDefNodes: ReadonlyArray<VariableDefinitionNode>,\n inputs: { [variable: string]: unknown },\n onError: (error: GraphQLError) => void,\n): { [variable: string]: unknown } {\n const coercedValues: { [variable: string]: unknown } = {};\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varTypeReference = typeReferenceFromNode(varDefNode.type);\n\n if (!isInputType(schemaFragment.definitions, varTypeReference)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n [varDefNode.type],\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(\n varDefNode.defaultValue,\n varTypeReference,\n schemaFragment,\n );\n } else if (isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n [varDefNode],\n ),\n );\n }\n continue;\n }\n\n const value = inputs[varName];\n if (value === null && isNonNullType(varTypeReference)) {\n const varTypeStr = inspectTypeReference(varTypeReference);\n onError(\n locatedError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n [varDefNode],\n ),\n );\n continue;\n }\n\n coercedValues[varName] = coerceInputValue(\n value,\n varTypeReference,\n schemaFragment,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` + inspect(invalidValue);\n if (path.length > 0) {\n prefix += ` at \"${varName}${printPathArray(path)}\"`;\n }\n onError(locatedError(prefix + \"; \" + error.message, [varDefNode]));\n },\n );\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getArgumentValues(\n schemaFragment: SchemaFragment,\n def: FieldDefinition | DirectiveDefinitionTuple,\n node: FieldNode | DirectiveNode,\n variableValues?: Maybe<ObjMap<unknown>>,\n): { [argument: string]: unknown } {\n const definitions = schemaFragment.definitions;\n const coercedValues: { [argument: string]: unknown } = {};\n const argumentDefs =\n node.kind === Kind.FIELD\n ? getFieldArguments(def as FieldDefinition)\n : getDirectiveArguments(def as DirectiveDefinitionTuple);\n if (!argumentDefs) {\n return coercedValues;\n }\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const argumentNodes = node.arguments ?? [];\n const argNodeMap = new Map(argumentNodes.map((arg) => [arg.name.value, arg]));\n\n for (const [name, argumentDef] of Object.entries(argumentDefs)) {\n const argumentNode = argNodeMap.get(name);\n const argumentTypeRef = getInputValueTypeReference(argumentDef);\n const defaultValue = getInputDefaultValue(argumentDef);\n\n if (argumentNode == null) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" was not provided.`,\n [node],\n );\n }\n continue;\n }\n\n if (!isDefined(definitions, argumentTypeRef)) {\n throw locatedError(\n `Could not find type for argument ${name} in ${node.kind} ${node.name.value}`,\n [argumentNode],\n );\n }\n\n // if (!schemaTypes.isInputType(argumentTypeRef)) {\n // const type = schemaTypes.printTypeRef(argumentTypeRef);\n // throw locatedError(\n // `Argument \"$${name}\" expected value of type \"${type}\" which cannot be used as an input type.`,\n // [argumentNode],\n // );\n // }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n if (\n variableValues == null ||\n !hasOwnProperty(variableValues, variableName)\n ) {\n if (defaultValue !== undefined) {\n coercedValues[name] = defaultValue;\n } else if (isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of required type \"${type}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n [valueNode],\n );\n }\n continue;\n }\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argumentTypeRef)) {\n const type = inspectTypeReference(argumentTypeRef);\n throw locatedError(\n `Argument \"${name}\" of non-null type \"${type}\" must not be null.\"`,\n [valueNode],\n );\n }\n\n const coercedValue = valueFromAST(\n valueNode,\n argumentTypeRef,\n schemaFragment,\n variableValues,\n );\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw locatedError(\n `Argument \"${name}\" has invalid value ${print(valueNode)}.`,\n [valueNode],\n );\n }\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nexport function getDirectiveValues(\n schemaFragment: SchemaFragment,\n directiveDef: DirectiveDefinitionTuple,\n node: { directives?: ReadonlyArray<DirectiveNode> },\n variableValues?: Maybe<ObjMap<unknown>>,\n): undefined | { [argument: string]: unknown } {\n const name = getDirectiveName(directiveDef);\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n const directiveNode = node.directives?.find(\n (directive) => directive.name.value === name,\n );\n\n if (directiveNode) {\n return getArgumentValues(\n schemaFragment,\n directiveDef,\n directiveNode,\n variableValues,\n );\n }\n}\n\nfunction hasOwnProperty(obj: unknown, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n"],
5
+ "mappings": ";AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoBA,SAAS,kBACd,gBACA,aACA,QACA,SACuB;AACvB,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,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,eAAe,KAAc,MAAuB;AAC3D,SAAO,OAAO,UAAU,eAAe,KAAK,KAAK,IAAI;AACvD;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphitation/supermassive",
3
3
  "license": "MIT",
4
- "version": "3.2.7",
4
+ "version": "3.3.0",
5
5
  "main": "./lib/index",
6
6
  "repository": {
7
7
  "type": "git",