@zuplo/cli 6.70.57 → 6.70.60
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.
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/global.js +10 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/package.json +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js +322 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +12 -12
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +3 -1
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +28 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/graphql/error/GraphQLError.d.ts +151 -15
- package/node_modules/graphql/error/GraphQLError.js +143 -12
- package/node_modules/graphql/error/GraphQLError.mjs +143 -12
- package/node_modules/graphql/error/index.d.ts +6 -0
- package/node_modules/graphql/error/index.mjs +6 -0
- package/node_modules/graphql/error/locatedError.d.ts +20 -0
- package/node_modules/graphql/error/locatedError.js +21 -0
- package/node_modules/graphql/error/locatedError.mjs +20 -0
- package/node_modules/graphql/error/syntaxError.d.ts +15 -0
- package/node_modules/graphql/error/syntaxError.js +16 -0
- package/node_modules/graphql/error/syntaxError.mjs +15 -0
- package/node_modules/graphql/execution/collectFields.js +6 -0
- package/node_modules/graphql/execution/collectFields.mjs +6 -0
- package/node_modules/graphql/execution/execute.d.ts +211 -12
- package/node_modules/graphql/execution/execute.js +214 -23
- package/node_modules/graphql/execution/execute.mjs +213 -23
- package/node_modules/graphql/execution/index.d.ts +6 -0
- package/node_modules/graphql/execution/index.mjs +6 -0
- package/node_modules/graphql/execution/mapAsyncIterator.d.ts +2 -0
- package/node_modules/graphql/execution/mapAsyncIterator.js +2 -0
- package/node_modules/graphql/execution/mapAsyncIterator.mjs +2 -0
- package/node_modules/graphql/execution/subscribe.d.ts +195 -5
- package/node_modules/graphql/execution/subscribe.js +154 -11
- package/node_modules/graphql/execution/subscribe.mjs +153 -11
- package/node_modules/graphql/execution/values.d.ts +167 -10
- package/node_modules/graphql/execution/values.js +149 -5
- package/node_modules/graphql/execution/values.mjs +148 -5
- package/node_modules/graphql/graphql.d.ts +163 -41
- package/node_modules/graphql/graphql.js +126 -4
- package/node_modules/graphql/graphql.mjs +131 -41
- package/node_modules/graphql/index.d.ts +11 -17
- package/node_modules/graphql/index.mjs +13 -19
- package/node_modules/graphql/jsutils/Maybe.d.ts +5 -1
- package/node_modules/graphql/jsutils/ObjMap.d.ts +4 -0
- package/node_modules/graphql/jsutils/Path.d.ts +30 -0
- package/node_modules/graphql/jsutils/Path.js +29 -0
- package/node_modules/graphql/jsutils/Path.mjs +29 -0
- package/node_modules/graphql/jsutils/PromiseOrValue.d.ts +1 -0
- package/node_modules/graphql/jsutils/devAssert.d.ts +1 -0
- package/node_modules/graphql/jsutils/devAssert.js +1 -0
- package/node_modules/graphql/jsutils/devAssert.mjs +1 -0
- package/node_modules/graphql/jsutils/didYouMean.d.ts +4 -1
- package/node_modules/graphql/jsutils/didYouMean.js +4 -1
- package/node_modules/graphql/jsutils/didYouMean.mjs +4 -1
- package/node_modules/graphql/jsutils/groupBy.d.ts +2 -0
- package/node_modules/graphql/jsutils/groupBy.js +2 -0
- package/node_modules/graphql/jsutils/groupBy.mjs +2 -0
- package/node_modules/graphql/jsutils/identityFunc.d.ts +2 -0
- package/node_modules/graphql/jsutils/identityFunc.js +2 -0
- package/node_modules/graphql/jsutils/identityFunc.mjs +2 -0
- package/node_modules/graphql/jsutils/inspect.d.ts +2 -0
- package/node_modules/graphql/jsutils/inspect.js +2 -0
- package/node_modules/graphql/jsutils/inspect.mjs +2 -0
- package/node_modules/graphql/jsutils/instanceOf.d.ts +2 -0
- package/node_modules/graphql/jsutils/instanceOf.js +2 -0
- package/node_modules/graphql/jsutils/instanceOf.mjs +2 -0
- package/node_modules/graphql/jsutils/invariant.d.ts +1 -0
- package/node_modules/graphql/jsutils/invariant.js +1 -0
- package/node_modules/graphql/jsutils/invariant.mjs +1 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.d.ts +2 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.js +2 -0
- package/node_modules/graphql/jsutils/isAsyncIterable.mjs +2 -0
- package/node_modules/graphql/jsutils/isIterableObject.d.ts +6 -5
- package/node_modules/graphql/jsutils/isIterableObject.js +6 -5
- package/node_modules/graphql/jsutils/isIterableObject.mjs +6 -5
- package/node_modules/graphql/jsutils/isObjectLike.d.ts +2 -0
- package/node_modules/graphql/jsutils/isObjectLike.js +2 -0
- package/node_modules/graphql/jsutils/isObjectLike.mjs +2 -0
- package/node_modules/graphql/jsutils/isPromise.d.ts +2 -0
- package/node_modules/graphql/jsutils/isPromise.js +2 -0
- package/node_modules/graphql/jsutils/isPromise.mjs +2 -0
- package/node_modules/graphql/jsutils/keyMap.d.ts +7 -14
- package/node_modules/graphql/jsutils/keyMap.js +7 -14
- package/node_modules/graphql/jsutils/keyMap.mjs +7 -14
- package/node_modules/graphql/jsutils/keyValMap.d.ts +9 -6
- package/node_modules/graphql/jsutils/keyValMap.js +9 -6
- package/node_modules/graphql/jsutils/keyValMap.mjs +9 -6
- package/node_modules/graphql/jsutils/mapValue.d.ts +2 -0
- package/node_modules/graphql/jsutils/mapValue.js +2 -0
- package/node_modules/graphql/jsutils/mapValue.mjs +2 -0
- package/node_modules/graphql/jsutils/memoize3.d.ts +2 -0
- package/node_modules/graphql/jsutils/memoize3.js +2 -0
- package/node_modules/graphql/jsutils/memoize3.mjs +2 -0
- package/node_modules/graphql/jsutils/naturalCompare.d.ts +2 -0
- package/node_modules/graphql/jsutils/naturalCompare.js +2 -0
- package/node_modules/graphql/jsutils/naturalCompare.mjs +2 -0
- package/node_modules/graphql/jsutils/printPathArray.d.ts +2 -0
- package/node_modules/graphql/jsutils/printPathArray.js +2 -0
- package/node_modules/graphql/jsutils/printPathArray.mjs +2 -0
- package/node_modules/graphql/jsutils/promiseForObject.d.ts +2 -0
- package/node_modules/graphql/jsutils/promiseForObject.js +2 -0
- package/node_modules/graphql/jsutils/promiseForObject.mjs +2 -0
- package/node_modules/graphql/jsutils/promiseReduce.d.ts +2 -0
- package/node_modules/graphql/jsutils/promiseReduce.js +2 -0
- package/node_modules/graphql/jsutils/promiseReduce.mjs +2 -0
- package/node_modules/graphql/jsutils/suggestionList.d.ts +2 -0
- package/node_modules/graphql/jsutils/suggestionList.js +4 -0
- package/node_modules/graphql/jsutils/suggestionList.mjs +4 -0
- package/node_modules/graphql/jsutils/toError.d.ts +2 -0
- package/node_modules/graphql/jsutils/toError.js +2 -0
- package/node_modules/graphql/jsutils/toError.mjs +2 -0
- package/node_modules/graphql/jsutils/toObjMap.d.ts +1 -0
- package/node_modules/graphql/jsutils/toObjMap.js +1 -0
- package/node_modules/graphql/jsutils/toObjMap.mjs +1 -0
- package/node_modules/graphql/language/ast.d.ts +412 -54
- package/node_modules/graphql/language/ast.js +95 -38
- package/node_modules/graphql/language/ast.mjs +95 -38
- package/node_modules/graphql/language/blockString.d.ts +1 -3
- package/node_modules/graphql/language/blockString.js +1 -3
- package/node_modules/graphql/language/blockString.mjs +1 -3
- package/node_modules/graphql/language/directiveLocation.d.ts +28 -8
- package/node_modules/graphql/language/directiveLocation.js +9 -6
- package/node_modules/graphql/language/directiveLocation.mjs +9 -6
- package/node_modules/graphql/language/index.d.ts +6 -0
- package/node_modules/graphql/language/index.mjs +6 -0
- package/node_modules/graphql/language/kinds.d.ts +57 -18
- package/node_modules/graphql/language/kinds.js +9 -6
- package/node_modules/graphql/language/kinds.mjs +9 -6
- package/node_modules/graphql/language/lexer.d.ts +47 -14
- package/node_modules/graphql/language/lexer.js +71 -13
- package/node_modules/graphql/language/lexer.mjs +70 -13
- package/node_modules/graphql/language/location.d.ts +16 -3
- package/node_modules/graphql/language/location.js +14 -3
- package/node_modules/graphql/language/location.mjs +14 -3
- package/node_modules/graphql/language/parser.d.ts +236 -13
- package/node_modules/graphql/language/parser.js +224 -0
- package/node_modules/graphql/language/parser.mjs +224 -3
- package/node_modules/graphql/language/predicates.d.ts +169 -0
- package/node_modules/graphql/language/predicates.js +170 -0
- package/node_modules/graphql/language/predicates.mjs +180 -0
- package/node_modules/graphql/language/printLocation.d.ts +28 -0
- package/node_modules/graphql/language/printLocation.js +29 -0
- package/node_modules/graphql/language/printLocation.mjs +28 -0
- package/node_modules/graphql/language/printString.d.ts +2 -0
- package/node_modules/graphql/language/printString.js +5 -1
- package/node_modules/graphql/language/printString.mjs +5 -1
- package/node_modules/graphql/language/printer.d.ts +12 -0
- package/node_modules/graphql/language/printer.js +19 -0
- package/node_modules/graphql/language/printer.mjs +18 -0
- package/node_modules/graphql/language/schemaCoordinateLexer.d.ts +8 -6
- package/node_modules/graphql/language/schemaCoordinateLexer.js +10 -6
- package/node_modules/graphql/language/schemaCoordinateLexer.mjs +10 -6
- package/node_modules/graphql/language/source.d.ts +28 -0
- package/node_modules/graphql/language/source.js +32 -0
- package/node_modules/graphql/language/source.mjs +31 -0
- package/node_modules/graphql/language/tokenKind.d.ts +30 -3
- package/node_modules/graphql/language/tokenKind.js +8 -3
- package/node_modules/graphql/language/tokenKind.mjs +8 -3
- package/node_modules/graphql/language/visitor.d.ts +200 -72
- package/node_modules/graphql/language/visitor.js +122 -50
- package/node_modules/graphql/language/visitor.mjs +122 -54
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/subscription/index.d.ts +9 -3
- package/node_modules/graphql/subscription/index.mjs +9 -3
- package/node_modules/graphql/type/assertName.d.ts +18 -1
- package/node_modules/graphql/type/assertName.js +19 -1
- package/node_modules/graphql/type/assertName.mjs +18 -1
- package/node_modules/graphql/type/definition.d.ts +2540 -79
- package/node_modules/graphql/type/definition.js +2214 -61
- package/node_modules/graphql/type/definition.mjs +2241 -60
- package/node_modules/graphql/type/directives.d.ts +193 -18
- package/node_modules/graphql/type/directives.js +196 -19
- package/node_modules/graphql/type/directives.mjs +196 -19
- package/node_modules/graphql/type/index.d.ts +6 -0
- package/node_modules/graphql/type/index.mjs +6 -0
- package/node_modules/graphql/type/introspection.d.ts +36 -0
- package/node_modules/graphql/type/introspection.js +33 -0
- package/node_modules/graphql/type/introspection.mjs +41 -0
- package/node_modules/graphql/type/scalars.d.ts +29 -2
- package/node_modules/graphql/type/scalars.js +37 -2
- package/node_modules/graphql/type/scalars.mjs +36 -2
- package/node_modules/graphql/type/schema.d.ts +490 -28
- package/node_modules/graphql/type/schema.js +484 -26
- package/node_modules/graphql/type/schema.mjs +484 -26
- package/node_modules/graphql/type/validate.d.ts +31 -0
- package/node_modules/graphql/type/validate.js +32 -0
- package/node_modules/graphql/type/validate.mjs +31 -0
- package/node_modules/graphql/utilities/TypeInfo.d.ts +441 -1
- package/node_modules/graphql/utilities/TypeInfo.js +444 -1
- package/node_modules/graphql/utilities/TypeInfo.mjs +443 -1
- package/node_modules/graphql/utilities/assertValidName.d.ts +27 -2
- package/node_modules/graphql/utilities/assertValidName.js +28 -2
- package/node_modules/graphql/utilities/assertValidName.mjs +27 -2
- package/node_modules/graphql/utilities/astFromValue.d.ts +33 -3
- package/node_modules/graphql/utilities/astFromValue.js +36 -3
- package/node_modules/graphql/utilities/astFromValue.mjs +35 -3
- package/node_modules/graphql/utilities/buildASTSchema.d.ts +65 -6
- package/node_modules/graphql/utilities/buildASTSchema.js +65 -6
- package/node_modules/graphql/utilities/buildASTSchema.mjs +65 -6
- package/node_modules/graphql/utilities/buildClientSchema.d.ts +15 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +16 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +15 -0
- package/node_modules/graphql/utilities/coerceInputValue.d.ts +46 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +47 -0
- package/node_modules/graphql/utilities/coerceInputValue.mjs +46 -0
- package/node_modules/graphql/utilities/concatAST.d.ts +12 -0
- package/node_modules/graphql/utilities/concatAST.js +13 -0
- package/node_modules/graphql/utilities/concatAST.mjs +12 -0
- package/node_modules/graphql/utilities/extendSchema.d.ts +56 -3
- package/node_modules/graphql/utilities/extendSchema.js +63 -3
- package/node_modules/graphql/utilities/extendSchema.mjs +62 -3
- package/node_modules/graphql/utilities/findBreakingChanges.d.ts +95 -0
- package/node_modules/graphql/utilities/findBreakingChanges.js +68 -0
- package/node_modules/graphql/utilities/findBreakingChanges.mjs +70 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +132 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +41 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +41 -0
- package/node_modules/graphql/utilities/getOperationAST.d.ts +15 -0
- package/node_modules/graphql/utilities/getOperationAST.js +16 -0
- package/node_modules/graphql/utilities/getOperationAST.mjs +15 -0
- package/node_modules/graphql/utilities/getOperationRootType.d.ts +18 -1
- package/node_modules/graphql/utilities/getOperationRootType.js +19 -1
- package/node_modules/graphql/utilities/getOperationRootType.mjs +18 -1
- package/node_modules/graphql/utilities/index.d.ts +7 -0
- package/node_modules/graphql/utilities/index.mjs +7 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.d.ts +54 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.js +55 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +54 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.d.ts +35 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.js +36 -0
- package/node_modules/graphql/utilities/lexicographicSortSchema.mjs +35 -0
- package/node_modules/graphql/utilities/printSchema.d.ts +63 -0
- package/node_modules/graphql/utilities/printSchema.js +66 -0
- package/node_modules/graphql/utilities/printSchema.mjs +67 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.d.ts +62 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.js +64 -0
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.mjs +63 -0
- package/node_modules/graphql/utilities/separateOperations.d.ts +30 -0
- package/node_modules/graphql/utilities/separateOperations.js +31 -0
- package/node_modules/graphql/utilities/separateOperations.mjs +30 -0
- package/node_modules/graphql/utilities/stripIgnoredCharacters.d.ts +13 -6
- package/node_modules/graphql/utilities/stripIgnoredCharacters.js +16 -6
- package/node_modules/graphql/utilities/stripIgnoredCharacters.mjs +15 -6
- package/node_modules/graphql/utilities/typeComparators.d.ts +84 -0
- package/node_modules/graphql/utilities/typeComparators.js +85 -0
- package/node_modules/graphql/utilities/typeComparators.mjs +84 -0
- package/node_modules/graphql/utilities/typeFromAST.d.ts +86 -0
- package/node_modules/graphql/utilities/typeFromAST.js +3 -0
- package/node_modules/graphql/utilities/typeFromAST.mjs +3 -0
- package/node_modules/graphql/utilities/typedQueryDocumentNode.d.ts +4 -0
- package/node_modules/graphql/utilities/valueFromAST.d.ts +38 -0
- package/node_modules/graphql/utilities/valueFromAST.js +39 -0
- package/node_modules/graphql/utilities/valueFromAST.mjs +38 -0
- package/node_modules/graphql/utilities/valueFromASTUntyped.d.ts +15 -2
- package/node_modules/graphql/utilities/valueFromASTUntyped.js +16 -2
- package/node_modules/graphql/utilities/valueFromASTUntyped.mjs +15 -2
- package/node_modules/graphql/validation/ValidationContext.d.ts +399 -0
- package/node_modules/graphql/validation/ValidationContext.js +400 -0
- package/node_modules/graphql/validation/ValidationContext.mjs +401 -0
- package/node_modules/graphql/validation/index.d.ts +6 -0
- package/node_modules/graphql/validation/index.mjs +6 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +29 -0
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +33 -0
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs +32 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +29 -0
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.d.ts +29 -3
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +30 -3
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs +29 -3
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +29 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +29 -0
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +22 -0
- package/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.d.ts +31 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +33 -0
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs +34 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +29 -0
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +29 -0
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +29 -0
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.d.ts +29 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +30 -0
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs +29 -0
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +33 -0
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +45 -6
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +45 -6
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.d.ts +36 -0
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +37 -0
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs +36 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +22 -0
- package/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.d.ts +29 -3
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +30 -3
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs +29 -3
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.js +29 -0
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.d.ts +33 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +34 -0
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs +33 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +29 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.d.ts +32 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +33 -0
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs +32 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.d.ts +21 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +22 -0
- package/node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs +21 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +29 -0
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs +28 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +31 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +30 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.d.ts +32 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +33 -0
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs +32 -0
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +35 -1
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs +34 -1
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.d.ts +41 -0
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +42 -0
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs +41 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +28 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +29 -0
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +28 -0
- package/node_modules/graphql/validation/specifiedRules.d.ts +2 -3
- package/node_modules/graphql/validation/specifiedRules.js +2 -3
- package/node_modules/graphql/validation/specifiedRules.mjs +2 -3
- package/node_modules/graphql/validation/validate.d.ts +70 -9
- package/node_modules/graphql/validation/validate.js +63 -7
- package/node_modules/graphql/validation/validate.mjs +63 -7
- package/node_modules/graphql/version.d.ts +3 -6
- package/node_modules/graphql/version.js +6 -8
- package/node_modules/graphql/version.mjs +5 -8
- package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/converter.js +4 -2
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-XAW2AYUG.js +0 -322
- package/node_modules/@zuplo/runtime/out/esm/chunk-XAW2AYUG.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-XAW2AYUG.js.LEGAL.txt → chunk-6WKYPMAI.js.LEGAL.txt} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @category Errors */
|
|
1
2
|
import { isObjectLike } from '../jsutils/isObjectLike.mjs';
|
|
2
3
|
import { getLocation } from '../language/location.mjs';
|
|
3
4
|
import {
|
|
@@ -47,9 +48,7 @@ export class GraphQLError extends Error {
|
|
|
47
48
|
* Enumerable, and appears in the result of JSON.stringify().
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
|
-
/**
|
|
51
|
-
* An array of GraphQL AST Nodes corresponding to this error.
|
|
52
|
-
*/
|
|
51
|
+
/** An array of GraphQL AST Nodes corresponding to this error. */
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
54
|
* The source GraphQL document for the first location of this error.
|
|
@@ -63,15 +62,92 @@ export class GraphQLError extends Error {
|
|
|
63
62
|
* which correspond to this error.
|
|
64
63
|
*/
|
|
65
64
|
|
|
66
|
-
/**
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
/** Original error that caused this GraphQLError, if one exists. */
|
|
66
|
+
|
|
67
|
+
/** Extension fields to add to the formatted error. */
|
|
69
68
|
|
|
70
69
|
/**
|
|
71
|
-
*
|
|
70
|
+
* Creates a GraphQLError instance.
|
|
71
|
+
* @param message - Human-readable error message.
|
|
72
|
+
* @param options - Error metadata such as source locations, response path, original error, and extensions.
|
|
73
|
+
* This positional-arguments constructor overload is deprecated. Use the
|
|
74
|
+
* `GraphQLError(message, options)` overload instead.
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* // Create an error from AST nodes and response metadata.
|
|
78
|
+
* import { parse } from 'graphql/language';
|
|
79
|
+
* import { GraphQLError } from 'graphql/error';
|
|
80
|
+
*
|
|
81
|
+
* const document = parse('{ greeting }');
|
|
82
|
+
* const fieldNode = document.definitions[0].selectionSet.selections[0];
|
|
83
|
+
* const error = new GraphQLError('Cannot query this field.', {
|
|
84
|
+
* nodes: fieldNode,
|
|
85
|
+
* path: ['greeting'],
|
|
86
|
+
* extensions: { code: 'FORBIDDEN' },
|
|
87
|
+
* });
|
|
88
|
+
*
|
|
89
|
+
* error.message; // => 'Cannot query this field.'
|
|
90
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
91
|
+
* error.path; // => ['greeting']
|
|
92
|
+
* error.extensions; // => { code: 'FORBIDDEN' }
|
|
93
|
+
* ```
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* // This variant derives locations from source positions and preserves the original error.
|
|
97
|
+
* import { Source } from 'graphql/language';
|
|
98
|
+
* import { GraphQLError } from 'graphql/error';
|
|
99
|
+
*
|
|
100
|
+
* const source = new Source('{ greeting }');
|
|
101
|
+
* const originalError = new Error('Database unavailable.');
|
|
102
|
+
* const error = new GraphQLError('Resolver failed.', {
|
|
103
|
+
* source,
|
|
104
|
+
* positions: [2],
|
|
105
|
+
* path: ['greeting'],
|
|
106
|
+
* originalError,
|
|
107
|
+
* });
|
|
108
|
+
*
|
|
109
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
110
|
+
* error.path; // => ['greeting']
|
|
111
|
+
* error.originalError; // => originalError
|
|
112
|
+
* ```
|
|
72
113
|
*/
|
|
73
114
|
|
|
74
115
|
/**
|
|
116
|
+
* Creates a GraphQLError instance using the legacy positional constructor.
|
|
117
|
+
* This deprecated overload will be removed in v17. Prefer the
|
|
118
|
+
* `GraphQLErrorOptions` object overload, which keeps optional error metadata
|
|
119
|
+
* in a single options bag.
|
|
120
|
+
* @param message - Human-readable error message.
|
|
121
|
+
* @param nodes - AST node or nodes associated with this error.
|
|
122
|
+
* @param source - Source document used to derive error locations.
|
|
123
|
+
* @param positions - Character offsets in the source document associated with
|
|
124
|
+
* this error.
|
|
125
|
+
* @param path - Response path where this error occurred during execution.
|
|
126
|
+
* @param originalError - Original error that caused this GraphQLError, if one
|
|
127
|
+
* exists.
|
|
128
|
+
* @param extensions - Extension fields to include in the formatted error.
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* import { Source } from 'graphql/language';
|
|
132
|
+
* import { GraphQLError } from 'graphql/error';
|
|
133
|
+
*
|
|
134
|
+
* const source = new Source('{ greeting }');
|
|
135
|
+
* const originalError = new Error('Database unavailable.');
|
|
136
|
+
* const error = new GraphQLError(
|
|
137
|
+
* 'Resolver failed.',
|
|
138
|
+
* undefined,
|
|
139
|
+
* source,
|
|
140
|
+
* [2],
|
|
141
|
+
* ['greeting'],
|
|
142
|
+
* originalError,
|
|
143
|
+
* { code: 'INTERNAL' },
|
|
144
|
+
* );
|
|
145
|
+
*
|
|
146
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
147
|
+
* error.path; // => ['greeting']
|
|
148
|
+
* error.originalError; // => originalError
|
|
149
|
+
* error.extensions; // => { code: 'INTERNAL' }
|
|
150
|
+
* ```
|
|
75
151
|
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
76
152
|
*/
|
|
77
153
|
constructor(message, ...rawArgs) {
|
|
@@ -181,10 +257,30 @@ export class GraphQLError extends Error {
|
|
|
181
257
|
}
|
|
182
258
|
/* c8 ignore stop */
|
|
183
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Returns the value used by `Object.prototype.toString`.
|
|
262
|
+
* @returns The built-in string tag for this object.
|
|
263
|
+
*/
|
|
184
264
|
|
|
185
265
|
get [Symbol.toStringTag]() {
|
|
186
266
|
return 'GraphQLError';
|
|
187
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Returns this error as a human-readable message with source locations.
|
|
270
|
+
* @returns The formatted error string.
|
|
271
|
+
* @example
|
|
272
|
+
* ```ts
|
|
273
|
+
* import { Source } from 'graphql/language';
|
|
274
|
+
* import { GraphQLError } from 'graphql/error';
|
|
275
|
+
*
|
|
276
|
+
* const error = new GraphQLError('Cannot query field "name".', {
|
|
277
|
+
* source: new Source('{ name }'),
|
|
278
|
+
* positions: [2],
|
|
279
|
+
* });
|
|
280
|
+
*
|
|
281
|
+
* error.toString(); // => 'Cannot query field "name".\n\nGraphQL request:1:3\n1 | { name }\n | ^'
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
188
284
|
|
|
189
285
|
toString() {
|
|
190
286
|
let output = this.message;
|
|
@@ -203,6 +299,21 @@ export class GraphQLError extends Error {
|
|
|
203
299
|
|
|
204
300
|
return output;
|
|
205
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Returns the JSON representation used when this object is serialized.
|
|
304
|
+
* @returns The JSON-serializable representation.
|
|
305
|
+
* @example
|
|
306
|
+
* ```ts
|
|
307
|
+
* import { GraphQLError } from 'graphql/error';
|
|
308
|
+
*
|
|
309
|
+
* const error = new GraphQLError('Resolver failed.', {
|
|
310
|
+
* path: ['viewer', 'name'],
|
|
311
|
+
* extensions: { code: 'INTERNAL' },
|
|
312
|
+
* });
|
|
313
|
+
*
|
|
314
|
+
* error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
206
317
|
|
|
207
318
|
toJSON() {
|
|
208
319
|
const formattedError = {
|
|
@@ -228,14 +339,23 @@ export class GraphQLError extends Error {
|
|
|
228
339
|
function undefinedIfEmpty(array) {
|
|
229
340
|
return array === undefined || array.length === 0 ? undefined : array;
|
|
230
341
|
}
|
|
231
|
-
/**
|
|
232
|
-
* See: https://spec.graphql.org/draft/#sec-Errors
|
|
233
|
-
*/
|
|
342
|
+
/** See: https://spec.graphql.org/draft/#sec-Errors */
|
|
234
343
|
|
|
235
344
|
/**
|
|
236
345
|
* Prints a GraphQLError to a string, representing useful location information
|
|
237
|
-
* about the error's position in the source.
|
|
346
|
+
* about the error's position in the source. This deprecated helper is retained
|
|
347
|
+
* for backwards compatibility; call `error.toString()` instead because
|
|
348
|
+
* printError will be removed in v17.
|
|
349
|
+
* @param error - The error to format.
|
|
350
|
+
* @returns The printed string representation.
|
|
351
|
+
* @example
|
|
352
|
+
* ```ts
|
|
353
|
+
* import { GraphQLError, printError } from 'graphql/error';
|
|
354
|
+
*
|
|
355
|
+
* const message = printError(new GraphQLError('Example error'));
|
|
238
356
|
*
|
|
357
|
+
* message; // => 'Example error'
|
|
358
|
+
* ```
|
|
239
359
|
* @deprecated Please use `error.toString` instead. Will be removed in v17
|
|
240
360
|
*/
|
|
241
361
|
export function printError(error) {
|
|
@@ -243,8 +363,19 @@ export function printError(error) {
|
|
|
243
363
|
}
|
|
244
364
|
/**
|
|
245
365
|
* Given a GraphQLError, format it according to the rules described by the
|
|
246
|
-
* Response Format, Errors section of the GraphQL Specification.
|
|
366
|
+
* Response Format, Errors section of the GraphQL Specification. This deprecated
|
|
367
|
+
* helper is retained for backwards compatibility; call `error.toJSON()`
|
|
368
|
+
* instead because formatError will be removed in v17.
|
|
369
|
+
* @param error - The error to format.
|
|
370
|
+
* @returns The JSON-serializable formatted error.
|
|
371
|
+
* @example
|
|
372
|
+
* ```ts
|
|
373
|
+
* import { GraphQLError, formatError } from 'graphql/error';
|
|
374
|
+
*
|
|
375
|
+
* const formatted = formatError(new GraphQLError('Example error'));
|
|
247
376
|
*
|
|
377
|
+
* formatted; // => { message: 'Example error' }
|
|
378
|
+
* ```
|
|
248
379
|
* @deprecated Please use `error.toJSON` instead. Will be removed in v17
|
|
249
380
|
*/
|
|
250
381
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create, format, and locate GraphQL errors.
|
|
3
|
+
*
|
|
4
|
+
* These exports are also available from the root `graphql` package.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
1
7
|
export { GraphQLError, printError, formatError } from './GraphQLError';
|
|
2
8
|
export type {
|
|
3
9
|
GraphQLErrorOptions,
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create, format, and locate GraphQL errors.
|
|
3
|
+
*
|
|
4
|
+
* These exports are also available from the root `graphql` package.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
1
7
|
export { GraphQLError, printError, formatError } from './GraphQLError.mjs';
|
|
2
8
|
export { syntaxError } from './syntaxError.mjs';
|
|
3
9
|
export { locatedError } from './locatedError.mjs';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @category Errors */
|
|
1
2
|
import type { Maybe } from '../jsutils/Maybe';
|
|
2
3
|
import type { ASTNode } from '../language/ast';
|
|
3
4
|
import { GraphQLError } from './GraphQLError';
|
|
@@ -5,6 +6,25 @@ import { GraphQLError } from './GraphQLError';
|
|
|
5
6
|
* Given an arbitrary value, presumably thrown while attempting to execute a
|
|
6
7
|
* GraphQL operation, produce a new GraphQLError aware of the location in the
|
|
7
8
|
* document responsible for the original Error.
|
|
9
|
+
* @param rawOriginalError - The original error value to wrap.
|
|
10
|
+
* @param nodes - The AST nodes associated with the error.
|
|
11
|
+
* @param path - The response path associated with the error.
|
|
12
|
+
* @returns The GraphQL error.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { parse } from 'graphql/language';
|
|
16
|
+
* import { locatedError } from 'graphql/error';
|
|
17
|
+
*
|
|
18
|
+
* const document = parse('{ viewer { name } }');
|
|
19
|
+
* const fieldNode = document.definitions[0].selectionSet.selections[0];
|
|
20
|
+
* const error = locatedError(new Error('Resolver failed'), fieldNode, [
|
|
21
|
+
* 'viewer',
|
|
22
|
+
* ]);
|
|
23
|
+
*
|
|
24
|
+
* error.message; // => 'Resolver failed'
|
|
25
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
26
|
+
* error.path; // => ['viewer']
|
|
27
|
+
* ```
|
|
8
28
|
*/
|
|
9
29
|
export declare function locatedError(
|
|
10
30
|
rawOriginalError: unknown,
|
|
@@ -9,10 +9,31 @@ var _toError = require('../jsutils/toError.js');
|
|
|
9
9
|
|
|
10
10
|
var _GraphQLError = require('./GraphQLError.js');
|
|
11
11
|
|
|
12
|
+
/** @category Errors */
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Given an arbitrary value, presumably thrown while attempting to execute a
|
|
14
16
|
* GraphQL operation, produce a new GraphQLError aware of the location in the
|
|
15
17
|
* document responsible for the original Error.
|
|
18
|
+
* @param rawOriginalError - The original error value to wrap.
|
|
19
|
+
* @param nodes - The AST nodes associated with the error.
|
|
20
|
+
* @param path - The response path associated with the error.
|
|
21
|
+
* @returns The GraphQL error.
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { parse } from 'graphql/language';
|
|
25
|
+
* import { locatedError } from 'graphql/error';
|
|
26
|
+
*
|
|
27
|
+
* const document = parse('{ viewer { name } }');
|
|
28
|
+
* const fieldNode = document.definitions[0].selectionSet.selections[0];
|
|
29
|
+
* const error = locatedError(new Error('Resolver failed'), fieldNode, [
|
|
30
|
+
* 'viewer',
|
|
31
|
+
* ]);
|
|
32
|
+
*
|
|
33
|
+
* error.message; // => 'Resolver failed'
|
|
34
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
35
|
+
* error.path; // => ['viewer']
|
|
36
|
+
* ```
|
|
16
37
|
*/
|
|
17
38
|
function locatedError(rawOriginalError, nodes, path) {
|
|
18
39
|
var _nodes;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
/** @category Errors */
|
|
1
2
|
import { toError } from '../jsutils/toError.mjs';
|
|
2
3
|
import { GraphQLError } from './GraphQLError.mjs';
|
|
3
4
|
/**
|
|
4
5
|
* Given an arbitrary value, presumably thrown while attempting to execute a
|
|
5
6
|
* GraphQL operation, produce a new GraphQLError aware of the location in the
|
|
6
7
|
* document responsible for the original Error.
|
|
8
|
+
* @param rawOriginalError - The original error value to wrap.
|
|
9
|
+
* @param nodes - The AST nodes associated with the error.
|
|
10
|
+
* @param path - The response path associated with the error.
|
|
11
|
+
* @returns The GraphQL error.
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { parse } from 'graphql/language';
|
|
15
|
+
* import { locatedError } from 'graphql/error';
|
|
16
|
+
*
|
|
17
|
+
* const document = parse('{ viewer { name } }');
|
|
18
|
+
* const fieldNode = document.definitions[0].selectionSet.selections[0];
|
|
19
|
+
* const error = locatedError(new Error('Resolver failed'), fieldNode, [
|
|
20
|
+
* 'viewer',
|
|
21
|
+
* ]);
|
|
22
|
+
*
|
|
23
|
+
* error.message; // => 'Resolver failed'
|
|
24
|
+
* error.locations; // => [{ line: 1, column: 3 }]
|
|
25
|
+
* error.path; // => ['viewer']
|
|
26
|
+
* ```
|
|
7
27
|
*/
|
|
8
28
|
|
|
9
29
|
export function locatedError(rawOriginalError, nodes, path) {
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
/** @category Errors */
|
|
1
2
|
import type { Source } from '../language/source';
|
|
2
3
|
import { GraphQLError } from './GraphQLError';
|
|
3
4
|
/**
|
|
4
5
|
* Produces a GraphQLError representing a syntax error, containing useful
|
|
5
6
|
* descriptive information about the syntax error's position in the source.
|
|
7
|
+
* @param source - The GraphQL source containing the syntax error.
|
|
8
|
+
* @param position - Character offset where the syntax error was encountered.
|
|
9
|
+
* @param description - Human-readable description of the syntax error.
|
|
10
|
+
* @returns A GraphQLError located at the syntax error position.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { Source } from 'graphql/language';
|
|
14
|
+
* import { syntaxError } from 'graphql/error';
|
|
15
|
+
*
|
|
16
|
+
* const error = syntaxError(new Source('query {'), 7, 'Expected Name');
|
|
17
|
+
*
|
|
18
|
+
* error.message; // => 'Syntax Error: Expected Name'
|
|
19
|
+
* error.locations; // => [{ line: 1, column: 8 }]
|
|
20
|
+
* ```
|
|
6
21
|
*/
|
|
7
22
|
export declare function syntaxError(
|
|
8
23
|
source: Source,
|
|
@@ -7,9 +7,25 @@ exports.syntaxError = syntaxError;
|
|
|
7
7
|
|
|
8
8
|
var _GraphQLError = require('./GraphQLError.js');
|
|
9
9
|
|
|
10
|
+
/** @category Errors */
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* Produces a GraphQLError representing a syntax error, containing useful
|
|
12
14
|
* descriptive information about the syntax error's position in the source.
|
|
15
|
+
* @param source - The GraphQL source containing the syntax error.
|
|
16
|
+
* @param position - Character offset where the syntax error was encountered.
|
|
17
|
+
* @param description - Human-readable description of the syntax error.
|
|
18
|
+
* @returns A GraphQLError located at the syntax error position.
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { Source } from 'graphql/language';
|
|
22
|
+
* import { syntaxError } from 'graphql/error';
|
|
23
|
+
*
|
|
24
|
+
* const error = syntaxError(new Source('query {'), 7, 'Expected Name');
|
|
25
|
+
*
|
|
26
|
+
* error.message; // => 'Syntax Error: Expected Name'
|
|
27
|
+
* error.locations; // => [{ line: 1, column: 8 }]
|
|
28
|
+
* ```
|
|
13
29
|
*/
|
|
14
30
|
function syntaxError(source, position, description) {
|
|
15
31
|
return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, {
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
/** @category Errors */
|
|
1
2
|
import { GraphQLError } from './GraphQLError.mjs';
|
|
2
3
|
/**
|
|
3
4
|
* Produces a GraphQLError representing a syntax error, containing useful
|
|
4
5
|
* descriptive information about the syntax error's position in the source.
|
|
6
|
+
* @param source - The GraphQL source containing the syntax error.
|
|
7
|
+
* @param position - Character offset where the syntax error was encountered.
|
|
8
|
+
* @param description - Human-readable description of the syntax error.
|
|
9
|
+
* @returns A GraphQLError located at the syntax error position.
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { Source } from 'graphql/language';
|
|
13
|
+
* import { syntaxError } from 'graphql/error';
|
|
14
|
+
*
|
|
15
|
+
* const error = syntaxError(new Source('query {'), 7, 'Expected Name');
|
|
16
|
+
*
|
|
17
|
+
* error.message; // => 'Syntax Error: Expected Name'
|
|
18
|
+
* error.locations; // => [{ line: 1, column: 8 }]
|
|
19
|
+
* ```
|
|
5
20
|
*/
|
|
6
21
|
|
|
7
22
|
export function syntaxError(source, position, description) {
|
|
@@ -167,6 +167,8 @@ function collectFieldsImpl(
|
|
|
167
167
|
/**
|
|
168
168
|
* Determines if a field should be included based on the `@include` and `@skip`
|
|
169
169
|
* directives, where `@skip` has higher precedence than `@include`.
|
|
170
|
+
*
|
|
171
|
+
* @internal
|
|
170
172
|
*/
|
|
171
173
|
|
|
172
174
|
function shouldIncludeNode(variableValues, node) {
|
|
@@ -196,6 +198,8 @@ function shouldIncludeNode(variableValues, node) {
|
|
|
196
198
|
}
|
|
197
199
|
/**
|
|
198
200
|
* Determines if a fragment is applicable to the given type.
|
|
201
|
+
*
|
|
202
|
+
* @internal
|
|
199
203
|
*/
|
|
200
204
|
|
|
201
205
|
function doesFragmentConditionMatch(schema, fragment, type) {
|
|
@@ -222,6 +226,8 @@ function doesFragmentConditionMatch(schema, fragment, type) {
|
|
|
222
226
|
}
|
|
223
227
|
/**
|
|
224
228
|
* Implements the logic to compute the key of a given field's entry
|
|
229
|
+
*
|
|
230
|
+
* @internal
|
|
225
231
|
*/
|
|
226
232
|
|
|
227
233
|
function getFieldEntryKey(node) {
|
|
@@ -158,6 +158,8 @@ function collectFieldsImpl(
|
|
|
158
158
|
/**
|
|
159
159
|
* Determines if a field should be included based on the `@include` and `@skip`
|
|
160
160
|
* directives, where `@skip` has higher precedence than `@include`.
|
|
161
|
+
*
|
|
162
|
+
* @internal
|
|
161
163
|
*/
|
|
162
164
|
|
|
163
165
|
function shouldIncludeNode(variableValues, node) {
|
|
@@ -183,6 +185,8 @@ function shouldIncludeNode(variableValues, node) {
|
|
|
183
185
|
}
|
|
184
186
|
/**
|
|
185
187
|
* Determines if a fragment is applicable to the given type.
|
|
188
|
+
*
|
|
189
|
+
* @internal
|
|
186
190
|
*/
|
|
187
191
|
|
|
188
192
|
function doesFragmentConditionMatch(schema, fragment, type) {
|
|
@@ -206,6 +210,8 @@ function doesFragmentConditionMatch(schema, fragment, type) {
|
|
|
206
210
|
}
|
|
207
211
|
/**
|
|
208
212
|
* Implements the logic to compute the key of a given field's entry
|
|
213
|
+
*
|
|
214
|
+
* @internal
|
|
209
215
|
*/
|
|
210
216
|
|
|
211
217
|
function getFieldEntryKey(node) {
|