├── LICENSE ├── README.md ├── index.js ├── manifest.json ├── node_modules ├── .package-lock.json ├── @types │ ├── arangodb │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ └── node │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assert.d.ts │ │ ├── assert │ │ └── strict.d.ts │ │ ├── async_hooks.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── diagnostics_channel.d.ts │ │ ├── dns.d.ts │ │ ├── dns │ │ └── promises.d.ts │ │ ├── dom-events.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── fs │ │ └── promises.d.ts │ │ ├── globals.d.ts │ │ ├── globals.global.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── package.json │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── readline │ │ └── promises.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── stream │ │ ├── consumers.d.ts │ │ ├── promises.d.ts │ │ └── web.d.ts │ │ ├── string_decoder.d.ts │ │ ├── test.d.ts │ │ ├── timers.d.ts │ │ ├── timers │ │ └── promises.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── ts4.8 │ │ ├── assert.d.ts │ │ ├── assert │ │ │ └── strict.d.ts │ │ ├── async_hooks.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── diagnostics_channel.d.ts │ │ ├── dns.d.ts │ │ ├── dns │ │ │ └── promises.d.ts │ │ ├── dom-events.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── fs │ │ │ └── promises.d.ts │ │ ├── globals.d.ts │ │ ├── globals.global.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── readline │ │ │ └── promises.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── stream │ │ │ ├── consumers.d.ts │ │ │ ├── promises.d.ts │ │ │ └── web.d.ts │ │ ├── string_decoder.d.ts │ │ ├── test.d.ts │ │ ├── timers.d.ts │ │ ├── timers │ │ │ └── promises.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts ├── graphql │ ├── LICENSE │ ├── README.md │ ├── error │ │ ├── GraphQLError.d.ts │ │ ├── GraphQLError.js │ │ ├── GraphQLError.js.flow │ │ ├── GraphQLError.mjs │ │ ├── formatError.d.ts │ │ ├── formatError.js │ │ ├── formatError.js.flow │ │ ├── formatError.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── locatedError.d.ts │ │ ├── locatedError.js │ │ ├── locatedError.js.flow │ │ ├── locatedError.mjs │ │ ├── syntaxError.d.ts │ │ ├── syntaxError.js │ │ ├── syntaxError.js.flow │ │ └── syntaxError.mjs │ ├── execution │ │ ├── execute.d.ts │ │ ├── execute.js │ │ ├── execute.js.flow │ │ ├── execute.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── values.d.ts │ │ ├── values.js │ │ ├── values.js.flow │ │ └── values.mjs │ ├── graphql.d.ts │ ├── graphql.js │ ├── graphql.js.flow │ ├── graphql.mjs │ ├── index.d.ts │ ├── index.js │ ├── index.js.flow │ ├── index.mjs │ ├── jsutils │ │ ├── Maybe.d.ts │ │ ├── ObjMap.js │ │ ├── ObjMap.js.flow │ │ ├── ObjMap.mjs │ │ ├── Path.d.ts │ │ ├── Path.js │ │ ├── Path.js.flow │ │ ├── Path.mjs │ │ ├── PromiseOrValue.d.ts │ │ ├── PromiseOrValue.js │ │ ├── PromiseOrValue.js.flow │ │ ├── PromiseOrValue.mjs │ │ ├── defineInspect.js │ │ ├── defineInspect.js.flow │ │ ├── defineInspect.mjs │ │ ├── devAssert.js │ │ ├── devAssert.js.flow │ │ ├── devAssert.mjs │ │ ├── didYouMean.js │ │ ├── didYouMean.js.flow │ │ ├── didYouMean.mjs │ │ ├── identityFunc.js │ │ ├── identityFunc.js.flow │ │ ├── identityFunc.mjs │ │ ├── inspect.js │ │ ├── inspect.js.flow │ │ ├── inspect.mjs │ │ ├── instanceOf.js │ │ ├── instanceOf.js.flow │ │ ├── instanceOf.mjs │ │ ├── invariant.js │ │ ├── invariant.js.flow │ │ ├── invariant.mjs │ │ ├── isAsyncIterable.js │ │ ├── isAsyncIterable.js.flow │ │ ├── isAsyncIterable.mjs │ │ ├── isObjectLike.js │ │ ├── isObjectLike.js.flow │ │ ├── isObjectLike.mjs │ │ ├── isPromise.js │ │ ├── isPromise.js.flow │ │ ├── isPromise.mjs │ │ ├── keyMap.js │ │ ├── keyMap.js.flow │ │ ├── keyMap.mjs │ │ ├── keyValMap.js │ │ ├── keyValMap.js.flow │ │ ├── keyValMap.mjs │ │ ├── mapValue.js │ │ ├── mapValue.js.flow │ │ ├── mapValue.mjs │ │ ├── memoize3.js │ │ ├── memoize3.js.flow │ │ ├── memoize3.mjs │ │ ├── naturalCompare.js │ │ ├── naturalCompare.js.flow │ │ ├── naturalCompare.mjs │ │ ├── nodejsCustomInspectSymbol.js │ │ ├── nodejsCustomInspectSymbol.js.flow │ │ ├── nodejsCustomInspectSymbol.mjs │ │ ├── printPathArray.js │ │ ├── printPathArray.js.flow │ │ ├── printPathArray.mjs │ │ ├── promiseForObject.js │ │ ├── promiseForObject.js.flow │ │ ├── promiseForObject.mjs │ │ ├── promiseReduce.js │ │ ├── promiseReduce.js.flow │ │ ├── promiseReduce.mjs │ │ ├── safeArrayFrom.js │ │ ├── safeArrayFrom.js.flow │ │ ├── safeArrayFrom.mjs │ │ ├── suggestionList.js │ │ ├── suggestionList.js.flow │ │ ├── suggestionList.mjs │ │ ├── toObjMap.js │ │ ├── toObjMap.js.flow │ │ └── toObjMap.mjs │ ├── language │ │ ├── ast.d.ts │ │ ├── ast.js │ │ ├── ast.js.flow │ │ ├── ast.mjs │ │ ├── blockString.d.ts │ │ ├── blockString.js │ │ ├── blockString.js.flow │ │ ├── blockString.mjs │ │ ├── directiveLocation.d.ts │ │ ├── directiveLocation.js │ │ ├── directiveLocation.js.flow │ │ ├── directiveLocation.mjs │ │ ├── experimentalOnlineParser │ │ │ ├── grammar.d.ts │ │ │ ├── grammar.js │ │ │ ├── grammar.js.flow │ │ │ ├── grammar.mjs │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.flow │ │ │ ├── index.mjs │ │ │ ├── onlineParser.d.ts │ │ │ ├── onlineParser.js │ │ │ ├── onlineParser.js.flow │ │ │ └── onlineParser.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── kinds.d.ts │ │ ├── kinds.js │ │ ├── kinds.js.flow │ │ ├── kinds.mjs │ │ ├── lexer.d.ts │ │ ├── lexer.js │ │ ├── lexer.js.flow │ │ ├── lexer.mjs │ │ ├── location.d.ts │ │ ├── location.js │ │ ├── location.js.flow │ │ ├── location.mjs │ │ ├── parser.d.ts │ │ ├── parser.js │ │ ├── parser.js.flow │ │ ├── parser.mjs │ │ ├── predicates.d.ts │ │ ├── predicates.js │ │ ├── predicates.js.flow │ │ ├── predicates.mjs │ │ ├── printLocation.d.ts │ │ ├── printLocation.js │ │ ├── printLocation.js.flow │ │ ├── printLocation.mjs │ │ ├── printer.d.ts │ │ ├── printer.js │ │ ├── printer.js.flow │ │ ├── printer.mjs │ │ ├── source.d.ts │ │ ├── source.js │ │ ├── source.js.flow │ │ ├── source.mjs │ │ ├── tokenKind.d.ts │ │ ├── tokenKind.js │ │ ├── tokenKind.js.flow │ │ ├── tokenKind.mjs │ │ ├── visitor.d.ts │ │ ├── visitor.js │ │ ├── visitor.js.flow │ │ └── visitor.mjs │ ├── package.json │ ├── polyfills │ │ ├── arrayFrom.js │ │ ├── arrayFrom.js.flow │ │ ├── arrayFrom.mjs │ │ ├── find.js │ │ ├── find.js.flow │ │ ├── find.mjs │ │ ├── isFinite.js │ │ ├── isFinite.js.flow │ │ ├── isFinite.mjs │ │ ├── isInteger.js │ │ ├── isInteger.js.flow │ │ ├── isInteger.mjs │ │ ├── objectEntries.js │ │ ├── objectEntries.js.flow │ │ ├── objectEntries.mjs │ │ ├── objectValues.js │ │ ├── objectValues.js.flow │ │ ├── objectValues.mjs │ │ ├── symbols.js │ │ ├── symbols.js.flow │ │ └── symbols.mjs │ ├── subscription │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── mapAsyncIterator.d.ts │ │ ├── mapAsyncIterator.js │ │ ├── mapAsyncIterator.js.flow │ │ ├── mapAsyncIterator.mjs │ │ ├── subscribe.d.ts │ │ ├── subscribe.js │ │ ├── subscribe.js.flow │ │ └── subscribe.mjs │ ├── type │ │ ├── definition.d.ts │ │ ├── definition.js │ │ ├── definition.js.flow │ │ ├── definition.mjs │ │ ├── directives.d.ts │ │ ├── directives.js │ │ ├── directives.js.flow │ │ ├── directives.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── introspection.d.ts │ │ ├── introspection.js │ │ ├── introspection.js.flow │ │ ├── introspection.mjs │ │ ├── scalars.d.ts │ │ ├── scalars.js │ │ ├── scalars.js.flow │ │ ├── scalars.mjs │ │ ├── schema.d.ts │ │ ├── schema.js │ │ ├── schema.js.flow │ │ ├── schema.mjs │ │ ├── validate.d.ts │ │ ├── validate.js │ │ ├── validate.js.flow │ │ └── validate.mjs │ ├── utilities │ │ ├── TypeInfo.d.ts │ │ ├── TypeInfo.js │ │ ├── TypeInfo.js.flow │ │ ├── TypeInfo.mjs │ │ ├── assertValidName.d.ts │ │ ├── assertValidName.js │ │ ├── assertValidName.js.flow │ │ ├── assertValidName.mjs │ │ ├── astFromValue.d.ts │ │ ├── astFromValue.js │ │ ├── astFromValue.js.flow │ │ ├── astFromValue.mjs │ │ ├── buildASTSchema.d.ts │ │ ├── buildASTSchema.js │ │ ├── buildASTSchema.js.flow │ │ ├── buildASTSchema.mjs │ │ ├── buildClientSchema.d.ts │ │ ├── buildClientSchema.js │ │ ├── buildClientSchema.js.flow │ │ ├── buildClientSchema.mjs │ │ ├── coerceInputValue.d.ts │ │ ├── coerceInputValue.js │ │ ├── coerceInputValue.js.flow │ │ ├── coerceInputValue.mjs │ │ ├── concatAST.d.ts │ │ ├── concatAST.js │ │ ├── concatAST.js.flow │ │ ├── concatAST.mjs │ │ ├── extendSchema.d.ts │ │ ├── extendSchema.js │ │ ├── extendSchema.js.flow │ │ ├── extendSchema.mjs │ │ ├── findBreakingChanges.d.ts │ │ ├── findBreakingChanges.js │ │ ├── findBreakingChanges.js.flow │ │ ├── findBreakingChanges.mjs │ │ ├── findDeprecatedUsages.d.ts │ │ ├── findDeprecatedUsages.js │ │ ├── findDeprecatedUsages.js.flow │ │ ├── findDeprecatedUsages.mjs │ │ ├── getIntrospectionQuery.d.ts │ │ ├── getIntrospectionQuery.js │ │ ├── getIntrospectionQuery.js.flow │ │ ├── getIntrospectionQuery.mjs │ │ ├── getOperationAST.d.ts │ │ ├── getOperationAST.js │ │ ├── getOperationAST.js.flow │ │ ├── getOperationAST.mjs │ │ ├── getOperationRootType.d.ts │ │ ├── getOperationRootType.js │ │ ├── getOperationRootType.js.flow │ │ ├── getOperationRootType.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── introspectionFromSchema.d.ts │ │ ├── introspectionFromSchema.js │ │ ├── introspectionFromSchema.js.flow │ │ ├── introspectionFromSchema.mjs │ │ ├── lexicographicSortSchema.d.ts │ │ ├── lexicographicSortSchema.js │ │ ├── lexicographicSortSchema.js.flow │ │ ├── lexicographicSortSchema.mjs │ │ ├── printSchema.d.ts │ │ ├── printSchema.js │ │ ├── printSchema.js.flow │ │ ├── printSchema.mjs │ │ ├── separateOperations.d.ts │ │ ├── separateOperations.js │ │ ├── separateOperations.js.flow │ │ ├── separateOperations.mjs │ │ ├── stripIgnoredCharacters.d.ts │ │ ├── stripIgnoredCharacters.js │ │ ├── stripIgnoredCharacters.js.flow │ │ ├── stripIgnoredCharacters.mjs │ │ ├── typeComparators.d.ts │ │ ├── typeComparators.js │ │ ├── typeComparators.js.flow │ │ ├── typeComparators.mjs │ │ ├── typeFromAST.d.ts │ │ ├── typeFromAST.js │ │ ├── typeFromAST.js.flow │ │ ├── typeFromAST.mjs │ │ ├── typedQueryDocumentNode.d.ts │ │ ├── valueFromAST.d.ts │ │ ├── valueFromAST.js │ │ ├── valueFromAST.js.flow │ │ ├── valueFromAST.mjs │ │ ├── valueFromASTUntyped.d.ts │ │ ├── valueFromASTUntyped.js │ │ ├── valueFromASTUntyped.js.flow │ │ └── valueFromASTUntyped.mjs │ ├── validation │ │ ├── ValidationContext.d.ts │ │ ├── ValidationContext.js │ │ ├── ValidationContext.js.flow │ │ ├── ValidationContext.mjs │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.flow │ │ ├── index.mjs │ │ ├── rules │ │ │ ├── ExecutableDefinitions.d.ts │ │ │ ├── ExecutableDefinitions.js │ │ │ ├── ExecutableDefinitions.js.flow │ │ │ ├── ExecutableDefinitions.mjs │ │ │ ├── ExecutableDefinitionsRule.d.ts │ │ │ ├── ExecutableDefinitionsRule.js │ │ │ ├── ExecutableDefinitionsRule.js.flow │ │ │ ├── ExecutableDefinitionsRule.mjs │ │ │ ├── FieldsOnCorrectTypeRule.d.ts │ │ │ ├── FieldsOnCorrectTypeRule.js │ │ │ ├── FieldsOnCorrectTypeRule.js.flow │ │ │ ├── FieldsOnCorrectTypeRule.mjs │ │ │ ├── FragmentsOnCompositeTypesRule.d.ts │ │ │ ├── FragmentsOnCompositeTypesRule.js │ │ │ ├── FragmentsOnCompositeTypesRule.js.flow │ │ │ ├── FragmentsOnCompositeTypesRule.mjs │ │ │ ├── KnownArgumentNamesRule.d.ts │ │ │ ├── KnownArgumentNamesRule.js │ │ │ ├── KnownArgumentNamesRule.js.flow │ │ │ ├── KnownArgumentNamesRule.mjs │ │ │ ├── KnownDirectivesRule.d.ts │ │ │ ├── KnownDirectivesRule.js │ │ │ ├── KnownDirectivesRule.js.flow │ │ │ ├── KnownDirectivesRule.mjs │ │ │ ├── KnownFragmentNamesRule.d.ts │ │ │ ├── KnownFragmentNamesRule.js │ │ │ ├── KnownFragmentNamesRule.js.flow │ │ │ ├── KnownFragmentNamesRule.mjs │ │ │ ├── KnownTypeNamesRule.d.ts │ │ │ ├── KnownTypeNamesRule.js │ │ │ ├── KnownTypeNamesRule.js.flow │ │ │ ├── KnownTypeNamesRule.mjs │ │ │ ├── LoneAnonymousOperationRule.d.ts │ │ │ ├── LoneAnonymousOperationRule.js │ │ │ ├── LoneAnonymousOperationRule.js.flow │ │ │ ├── LoneAnonymousOperationRule.mjs │ │ │ ├── LoneSchemaDefinition.d.ts │ │ │ ├── LoneSchemaDefinition.js │ │ │ ├── LoneSchemaDefinition.js.flow │ │ │ ├── LoneSchemaDefinition.mjs │ │ │ ├── LoneSchemaDefinitionRule.d.ts │ │ │ ├── LoneSchemaDefinitionRule.js │ │ │ ├── LoneSchemaDefinitionRule.js.flow │ │ │ ├── LoneSchemaDefinitionRule.mjs │ │ │ ├── NoFragmentCyclesRule.d.ts │ │ │ ├── NoFragmentCyclesRule.js │ │ │ ├── NoFragmentCyclesRule.js.flow │ │ │ ├── NoFragmentCyclesRule.mjs │ │ │ ├── NoUndefinedVariablesRule.d.ts │ │ │ ├── NoUndefinedVariablesRule.js │ │ │ ├── NoUndefinedVariablesRule.js.flow │ │ │ ├── NoUndefinedVariablesRule.mjs │ │ │ ├── NoUnusedFragmentsRule.d.ts │ │ │ ├── NoUnusedFragmentsRule.js │ │ │ ├── NoUnusedFragmentsRule.js.flow │ │ │ ├── NoUnusedFragmentsRule.mjs │ │ │ ├── NoUnusedVariablesRule.d.ts │ │ │ ├── NoUnusedVariablesRule.js │ │ │ ├── NoUnusedVariablesRule.js.flow │ │ │ ├── NoUnusedVariablesRule.mjs │ │ │ ├── OverlappingFieldsCanBeMergedRule.d.ts │ │ │ ├── OverlappingFieldsCanBeMergedRule.js │ │ │ ├── OverlappingFieldsCanBeMergedRule.js.flow │ │ │ ├── OverlappingFieldsCanBeMergedRule.mjs │ │ │ ├── PossibleFragmentSpreadsRule.d.ts │ │ │ ├── PossibleFragmentSpreadsRule.js │ │ │ ├── PossibleFragmentSpreadsRule.js.flow │ │ │ ├── PossibleFragmentSpreadsRule.mjs │ │ │ ├── PossibleTypeExtensions.d.ts │ │ │ ├── PossibleTypeExtensions.js │ │ │ ├── PossibleTypeExtensions.js.flow │ │ │ ├── PossibleTypeExtensions.mjs │ │ │ ├── PossibleTypeExtensionsRule.d.ts │ │ │ ├── PossibleTypeExtensionsRule.js │ │ │ ├── PossibleTypeExtensionsRule.js.flow │ │ │ ├── PossibleTypeExtensionsRule.mjs │ │ │ ├── ProvidedRequiredArgumentsRule.d.ts │ │ │ ├── ProvidedRequiredArgumentsRule.js │ │ │ ├── ProvidedRequiredArgumentsRule.js.flow │ │ │ ├── ProvidedRequiredArgumentsRule.mjs │ │ │ ├── ScalarLeafsRule.d.ts │ │ │ ├── ScalarLeafsRule.js │ │ │ ├── ScalarLeafsRule.js.flow │ │ │ ├── ScalarLeafsRule.mjs │ │ │ ├── SingleFieldSubscriptionsRule.d.ts │ │ │ ├── SingleFieldSubscriptionsRule.js │ │ │ ├── SingleFieldSubscriptionsRule.js.flow │ │ │ ├── SingleFieldSubscriptionsRule.mjs │ │ │ ├── UniqueArgumentNamesRule.d.ts │ │ │ ├── UniqueArgumentNamesRule.js │ │ │ ├── UniqueArgumentNamesRule.js.flow │ │ │ ├── UniqueArgumentNamesRule.mjs │ │ │ ├── UniqueDirectiveNames.d.ts │ │ │ ├── UniqueDirectiveNames.js │ │ │ ├── UniqueDirectiveNames.js.flow │ │ │ ├── UniqueDirectiveNames.mjs │ │ │ ├── UniqueDirectiveNamesRule.d.ts │ │ │ ├── UniqueDirectiveNamesRule.js │ │ │ ├── UniqueDirectiveNamesRule.js.flow │ │ │ ├── UniqueDirectiveNamesRule.mjs │ │ │ ├── UniqueDirectivesPerLocationRule.d.ts │ │ │ ├── UniqueDirectivesPerLocationRule.js │ │ │ ├── UniqueDirectivesPerLocationRule.js.flow │ │ │ ├── UniqueDirectivesPerLocationRule.mjs │ │ │ ├── UniqueEnumValueNames.d.ts │ │ │ ├── UniqueEnumValueNames.js │ │ │ ├── UniqueEnumValueNames.js.flow │ │ │ ├── UniqueEnumValueNames.mjs │ │ │ ├── UniqueEnumValueNamesRule.d.ts │ │ │ ├── UniqueEnumValueNamesRule.js │ │ │ ├── UniqueEnumValueNamesRule.js.flow │ │ │ ├── UniqueEnumValueNamesRule.mjs │ │ │ ├── UniqueFieldDefinitionNames.d.ts │ │ │ ├── UniqueFieldDefinitionNames.js │ │ │ ├── UniqueFieldDefinitionNames.js.flow │ │ │ ├── UniqueFieldDefinitionNames.mjs │ │ │ ├── UniqueFieldDefinitionNamesRule.d.ts │ │ │ ├── UniqueFieldDefinitionNamesRule.js │ │ │ ├── UniqueFieldDefinitionNamesRule.js.flow │ │ │ ├── UniqueFieldDefinitionNamesRule.mjs │ │ │ ├── UniqueFragmentNamesRule.d.ts │ │ │ ├── UniqueFragmentNamesRule.js │ │ │ ├── UniqueFragmentNamesRule.js.flow │ │ │ ├── UniqueFragmentNamesRule.mjs │ │ │ ├── UniqueInputFieldNamesRule.d.ts │ │ │ ├── UniqueInputFieldNamesRule.js │ │ │ ├── UniqueInputFieldNamesRule.js.flow │ │ │ ├── UniqueInputFieldNamesRule.mjs │ │ │ ├── UniqueOperationNamesRule.d.ts │ │ │ ├── UniqueOperationNamesRule.js │ │ │ ├── UniqueOperationNamesRule.js.flow │ │ │ ├── UniqueOperationNamesRule.mjs │ │ │ ├── UniqueOperationTypes.d.ts │ │ │ ├── UniqueOperationTypes.js │ │ │ ├── UniqueOperationTypes.js.flow │ │ │ ├── UniqueOperationTypes.mjs │ │ │ ├── UniqueOperationTypesRule.d.ts │ │ │ ├── UniqueOperationTypesRule.js │ │ │ ├── UniqueOperationTypesRule.js.flow │ │ │ ├── UniqueOperationTypesRule.mjs │ │ │ ├── UniqueTypeNames.d.ts │ │ │ ├── UniqueTypeNames.js │ │ │ ├── UniqueTypeNames.js.flow │ │ │ ├── UniqueTypeNames.mjs │ │ │ ├── UniqueTypeNamesRule.d.ts │ │ │ ├── UniqueTypeNamesRule.js │ │ │ ├── UniqueTypeNamesRule.js.flow │ │ │ ├── UniqueTypeNamesRule.mjs │ │ │ ├── UniqueVariableNamesRule.d.ts │ │ │ ├── UniqueVariableNamesRule.js │ │ │ ├── UniqueVariableNamesRule.js.flow │ │ │ ├── UniqueVariableNamesRule.mjs │ │ │ ├── ValuesOfCorrectTypeRule.d.ts │ │ │ ├── ValuesOfCorrectTypeRule.js │ │ │ ├── ValuesOfCorrectTypeRule.js.flow │ │ │ ├── ValuesOfCorrectTypeRule.mjs │ │ │ ├── VariablesAreInputTypesRule.d.ts │ │ │ ├── VariablesAreInputTypesRule.js │ │ │ ├── VariablesAreInputTypesRule.js.flow │ │ │ ├── VariablesAreInputTypesRule.mjs │ │ │ ├── VariablesInAllowedPositionRule.d.ts │ │ │ ├── VariablesInAllowedPositionRule.js │ │ │ ├── VariablesInAllowedPositionRule.js.flow │ │ │ ├── VariablesInAllowedPositionRule.mjs │ │ │ └── custom │ │ │ │ ├── NoDeprecatedCustomRule.d.ts │ │ │ │ ├── NoDeprecatedCustomRule.js │ │ │ │ ├── NoDeprecatedCustomRule.js.flow │ │ │ │ ├── NoDeprecatedCustomRule.mjs │ │ │ │ ├── NoSchemaIntrospectionCustomRule.d.ts │ │ │ │ ├── NoSchemaIntrospectionCustomRule.js │ │ │ │ ├── NoSchemaIntrospectionCustomRule.js.flow │ │ │ │ └── NoSchemaIntrospectionCustomRule.mjs │ │ ├── specifiedRules.d.ts │ │ ├── specifiedRules.js │ │ ├── specifiedRules.js.flow │ │ ├── specifiedRules.mjs │ │ ├── validate.d.ts │ │ ├── validate.js │ │ ├── validate.js.flow │ │ └── validate.mjs │ ├── version.d.ts │ ├── version.js │ ├── version.js.flow │ └── version.mjs └── undici-types │ ├── README.md │ ├── agent.d.ts │ ├── api.d.ts │ ├── balanced-pool.d.ts │ ├── cache.d.ts │ ├── client.d.ts │ ├── connector.d.ts │ ├── content-type.d.ts │ ├── cookies.d.ts │ ├── diagnostics-channel.d.ts │ ├── dispatcher.d.ts │ ├── errors.d.ts │ ├── fetch.d.ts │ ├── file.d.ts │ ├── filereader.d.ts │ ├── formdata.d.ts │ ├── global-dispatcher.d.ts │ ├── global-origin.d.ts │ ├── handlers.d.ts │ ├── header.d.ts │ ├── index.d.ts │ ├── interceptors.d.ts │ ├── mock-agent.d.ts │ ├── mock-client.d.ts │ ├── mock-errors.d.ts │ ├── mock-interceptor.d.ts │ ├── mock-pool.d.ts │ ├── package.json │ ├── patch.d.ts │ ├── pool-stats.d.ts │ ├── pool.d.ts │ ├── proxy-agent.d.ts │ ├── readable.d.ts │ ├── webidl.d.ts │ └── websocket.d.ts ├── package-lock.json ├── package.json ├── schema.js ├── scripts ├── setup.js └── teardown.js └── test ├── LICENSE ├── introspection.js ├── queries.js └── validation.js /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const schema = require('./schema'); 3 | const gql = require('graphql'); 4 | const graphql = gql.graphql; 5 | const formatError = gql.formatError; 6 | const createGraphqlRouter = require('@arangodb/foxx/graphql'); 7 | 8 | // This is a regular Foxx router. 9 | const router = createGraphqlRouter({schema, graphql: gql, graphiql: true}) 10 | .summary('GraphQL endpoint') 11 | .description('GraphQL endpoint for the Star Wars GraphQL example.'); 12 | 13 | module.context.use(router); 14 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-graphql", 3 | "version": "2.1.0", 4 | "description": "GraphQL Foxx Demo", 5 | "engines": { 6 | "arangodb": "^3.1.0" 7 | }, 8 | "author": "Alan Plum", 9 | "license": "Apache 2", 10 | "main": "index.js", 11 | "scripts": { 12 | "setup": "scripts/setup.js", 13 | "teardown": "scripts/teardown.js" 14 | }, 15 | "tests": "test/**/*.js" 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@types/arangodb/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /node_modules/@types/arangodb/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/arangodb` 3 | 4 | # Summary 5 | This package contains type definitions for arangodb (https://github.com/arangodb/arangodb). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arangodb. 9 | 10 | ### Additional Details 11 | * Last updated: Wed, 22 Nov 2023 00:24:48 GMT 12 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node) 13 | 14 | # Credits 15 | These definitions were written by [Alan Plum](https://github.com/pluma). 16 | -------------------------------------------------------------------------------- /node_modules/@types/arangodb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@types/arangodb", 3 | "version": "3.5.22", 4 | "description": "TypeScript definitions for arangodb", 5 | "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arangodb", 6 | "license": "MIT", 7 | "contributors": [ 8 | { 9 | "name": "Alan Plum", 10 | "githubUsername": "pluma", 11 | "url": "https://github.com/pluma" 12 | } 13 | ], 14 | "main": "", 15 | "types": "index.d.ts", 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", 19 | "directory": "types/arangodb" 20 | }, 21 | "scripts": {}, 22 | "dependencies": { 23 | "@types/node": "*" 24 | }, 25 | "typesPublisherContentHash": "8d08d24a67ebdf9c0a5632a2ea6bb9b8b86c32124df79a5bec2fcb7b871c36c0", 26 | "typeScriptVersion": "4.5", 27 | "nonNpm": true 28 | } -------------------------------------------------------------------------------- /node_modules/@types/node/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /node_modules/@types/node/assert/strict.d.ts: -------------------------------------------------------------------------------- 1 | declare module "assert/strict" { 2 | import { strict } from "node:assert"; 3 | export = strict; 4 | } 5 | declare module "node:assert/strict" { 6 | import { strict } from "node:assert"; 7 | export = strict; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ 2 | declare module "constants" { 3 | import { constants as osConstants, SignalConstants } from "node:os"; 4 | import { constants as cryptoConstants } from "node:crypto"; 5 | import { constants as fsConstants } from "node:fs"; 6 | 7 | const exp: 8 | & typeof osConstants.errno 9 | & typeof osConstants.priority 10 | & SignalConstants 11 | & typeof cryptoConstants 12 | & typeof fsConstants; 13 | export = exp; 14 | } 15 | 16 | declare module "node:constants" { 17 | import constants = require("constants"); 18 | export = constants; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/@types/node/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: typeof globalThis; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/stream/consumers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/consumers" { 2 | import { Blob as NodeBlob } from "node:buffer"; 3 | import { Readable } from "node:stream"; 4 | function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 5 | function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 6 | function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 7 | function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 8 | function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 9 | } 10 | declare module "node:stream/consumers" { 11 | export * from "stream/consumers"; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/assert/strict.d.ts: -------------------------------------------------------------------------------- 1 | declare module "assert/strict" { 2 | import { strict } from "node:assert"; 3 | export = strict; 4 | } 5 | declare module "node:assert/strict" { 6 | import { strict } from "node:assert"; 7 | export = strict; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ 2 | declare module "constants" { 3 | import { constants as osConstants, SignalConstants } from "node:os"; 4 | import { constants as cryptoConstants } from "node:crypto"; 5 | import { constants as fsConstants } from "node:fs"; 6 | 7 | const exp: 8 | & typeof osConstants.errno 9 | & typeof osConstants.priority 10 | & SignalConstants 11 | & typeof cryptoConstants 12 | & typeof fsConstants; 13 | export = exp; 14 | } 15 | 16 | declare module "node:constants" { 17 | import constants = require("constants"); 18 | export = constants; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: typeof globalThis; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/stream/consumers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/consumers" { 2 | import { Blob as NodeBlob } from "node:buffer"; 3 | import { Readable } from "node:stream"; 4 | function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 5 | function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 6 | function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 7 | function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 8 | function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 9 | } 10 | declare module "node:stream/consumers" { 11 | export * from "stream/consumers"; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/graphql/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) GraphQL Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/graphql/error/formatError.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.formatError = formatError; 7 | 8 | var _devAssert = _interopRequireDefault(require("../jsutils/devAssert.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | /** 13 | * Given a GraphQLError, format it according to the rules described by the 14 | * Response Format, Errors section of the GraphQL Specification. 15 | */ 16 | function formatError(error) { 17 | var _error$message; 18 | 19 | error || (0, _devAssert.default)(0, 'Received null or undefined error.'); 20 | var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.'; 21 | var locations = error.locations; 22 | var path = error.path; 23 | var extensions = error.extensions; 24 | return extensions && Object.keys(extensions).length > 0 ? { 25 | message: message, 26 | locations: locations, 27 | path: path, 28 | extensions: extensions 29 | } : { 30 | message: message, 31 | locations: locations, 32 | path: path 33 | }; 34 | } 35 | /** 36 | * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors 37 | */ 38 | -------------------------------------------------------------------------------- /node_modules/graphql/error/formatError.mjs: -------------------------------------------------------------------------------- 1 | import devAssert from "../jsutils/devAssert.mjs"; 2 | 3 | /** 4 | * Given a GraphQLError, format it according to the rules described by the 5 | * Response Format, Errors section of the GraphQL Specification. 6 | */ 7 | export function formatError(error) { 8 | var _error$message; 9 | 10 | error || devAssert(0, 'Received null or undefined error.'); 11 | var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.'; 12 | var locations = error.locations; 13 | var path = error.path; 14 | var extensions = error.extensions; 15 | return extensions && Object.keys(extensions).length > 0 ? { 16 | message: message, 17 | locations: locations, 18 | path: path, 19 | extensions: extensions 20 | } : { 21 | message: message, 22 | locations: locations, 23 | path: path 24 | }; 25 | } 26 | /** 27 | * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors 28 | */ 29 | -------------------------------------------------------------------------------- /node_modules/graphql/error/index.d.ts: -------------------------------------------------------------------------------- 1 | export { 2 | GraphQLError, 3 | GraphQLErrorExtensions, 4 | printError, 5 | } from './GraphQLError'; 6 | export { syntaxError } from './syntaxError'; 7 | export { locatedError } from './locatedError'; 8 | export { formatError, GraphQLFormattedError } from './formatError'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/error/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "GraphQLError", { 7 | enumerable: true, 8 | get: function get() { 9 | return _GraphQLError.GraphQLError; 10 | } 11 | }); 12 | Object.defineProperty(exports, "printError", { 13 | enumerable: true, 14 | get: function get() { 15 | return _GraphQLError.printError; 16 | } 17 | }); 18 | Object.defineProperty(exports, "syntaxError", { 19 | enumerable: true, 20 | get: function get() { 21 | return _syntaxError.syntaxError; 22 | } 23 | }); 24 | Object.defineProperty(exports, "locatedError", { 25 | enumerable: true, 26 | get: function get() { 27 | return _locatedError.locatedError; 28 | } 29 | }); 30 | Object.defineProperty(exports, "formatError", { 31 | enumerable: true, 32 | get: function get() { 33 | return _formatError.formatError; 34 | } 35 | }); 36 | 37 | var _GraphQLError = require("./GraphQLError.js"); 38 | 39 | var _syntaxError = require("./syntaxError.js"); 40 | 41 | var _locatedError = require("./locatedError.js"); 42 | 43 | var _formatError = require("./formatError.js"); 44 | -------------------------------------------------------------------------------- /node_modules/graphql/error/index.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export { GraphQLError, printError } from './GraphQLError'; 3 | 4 | export { syntaxError } from './syntaxError'; 5 | 6 | export { locatedError } from './locatedError'; 7 | 8 | export { formatError } from './formatError'; 9 | export type { GraphQLFormattedError } from './formatError'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/error/index.mjs: -------------------------------------------------------------------------------- 1 | export { GraphQLError, printError } from "./GraphQLError.mjs"; 2 | export { syntaxError } from "./syntaxError.mjs"; 3 | export { locatedError } from "./locatedError.mjs"; 4 | export { formatError } from "./formatError.mjs"; 5 | -------------------------------------------------------------------------------- /node_modules/graphql/error/locatedError.d.ts: -------------------------------------------------------------------------------- 1 | import { Maybe } from '../jsutils/Maybe'; 2 | 3 | import { ASTNode } from '../language/ast'; 4 | 5 | import { GraphQLError } from './GraphQLError'; 6 | 7 | /** 8 | * Given an arbitrary value, presumably thrown while attempting to execute a 9 | * GraphQL operation, produce a new GraphQLError aware of the location in the 10 | * document responsible for the original Error. 11 | */ 12 | export function locatedError( 13 | rawOriginalError: any, 14 | nodes: ASTNode | ReadonlyArray | undefined, 15 | path?: Maybe>, 16 | ): GraphQLError; 17 | -------------------------------------------------------------------------------- /node_modules/graphql/error/locatedError.mjs: -------------------------------------------------------------------------------- 1 | import inspect from "../jsutils/inspect.mjs"; 2 | import { GraphQLError } from "./GraphQLError.mjs"; 3 | /** 4 | * Given an arbitrary value, presumably thrown while attempting to execute a 5 | * GraphQL operation, produce a new GraphQLError aware of the location in the 6 | * document responsible for the original Error. 7 | */ 8 | 9 | export function locatedError(rawOriginalError, nodes, path) { 10 | var _nodes; 11 | 12 | // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. 13 | var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + inspect(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts. 14 | 15 | if (Array.isArray(originalError.path)) { 16 | return originalError; 17 | } 18 | 19 | return new GraphQLError(originalError.message, (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, originalError.source, originalError.positions, path, originalError); 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/graphql/error/syntaxError.d.ts: -------------------------------------------------------------------------------- 1 | import { Source } from '../language/source'; 2 | 3 | import { GraphQLError } from './GraphQLError'; 4 | 5 | /** 6 | * Produces a GraphQLError representing a syntax error, containing useful 7 | * descriptive information about the syntax error's position in the source. 8 | */ 9 | export function syntaxError( 10 | source: Source, 11 | position: number, 12 | description: string, 13 | ): GraphQLError; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/error/syntaxError.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.syntaxError = syntaxError; 7 | 8 | var _GraphQLError = require("./GraphQLError.js"); 9 | 10 | /** 11 | * Produces a GraphQLError representing a syntax error, containing useful 12 | * descriptive information about the syntax error's position in the source. 13 | */ 14 | function syntaxError(source, position, description) { 15 | return new _GraphQLError.GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]); 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/graphql/error/syntaxError.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { Source } from '../language/source'; 3 | 4 | import { GraphQLError } from './GraphQLError'; 5 | 6 | /** 7 | * Produces a GraphQLError representing a syntax error, containing useful 8 | * descriptive information about the syntax error's position in the source. 9 | */ 10 | export function syntaxError( 11 | source: Source, 12 | position: number, 13 | description: string, 14 | ): GraphQLError { 15 | return new GraphQLError(`Syntax Error: ${description}`, undefined, source, [ 16 | position, 17 | ]); 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/graphql/error/syntaxError.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "./GraphQLError.mjs"; 2 | /** 3 | * Produces a GraphQLError representing a syntax error, containing useful 4 | * descriptive information about the syntax error's position in the source. 5 | */ 6 | 7 | export function syntaxError(source, position, description) { 8 | return new GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/graphql/execution/index.d.ts: -------------------------------------------------------------------------------- 1 | export { pathToArray as responsePathAsArray } from '../jsutils/Path'; 2 | 3 | export { 4 | execute, 5 | executeSync, 6 | defaultFieldResolver, 7 | defaultTypeResolver, 8 | ExecutionArgs, 9 | ExecutionResult, 10 | FormattedExecutionResult, 11 | } from './execute'; 12 | 13 | export { getDirectiveValues } from './values'; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/execution/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "responsePathAsArray", { 7 | enumerable: true, 8 | get: function get() { 9 | return _Path.pathToArray; 10 | } 11 | }); 12 | Object.defineProperty(exports, "execute", { 13 | enumerable: true, 14 | get: function get() { 15 | return _execute.execute; 16 | } 17 | }); 18 | Object.defineProperty(exports, "executeSync", { 19 | enumerable: true, 20 | get: function get() { 21 | return _execute.executeSync; 22 | } 23 | }); 24 | Object.defineProperty(exports, "defaultFieldResolver", { 25 | enumerable: true, 26 | get: function get() { 27 | return _execute.defaultFieldResolver; 28 | } 29 | }); 30 | Object.defineProperty(exports, "defaultTypeResolver", { 31 | enumerable: true, 32 | get: function get() { 33 | return _execute.defaultTypeResolver; 34 | } 35 | }); 36 | Object.defineProperty(exports, "getDirectiveValues", { 37 | enumerable: true, 38 | get: function get() { 39 | return _values.getDirectiveValues; 40 | } 41 | }); 42 | 43 | var _Path = require("../jsutils/Path.js"); 44 | 45 | var _execute = require("./execute.js"); 46 | 47 | var _values = require("./values.js"); 48 | -------------------------------------------------------------------------------- /node_modules/graphql/execution/index.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export { pathToArray as responsePathAsArray } from '../jsutils/Path'; 3 | 4 | export { 5 | execute, 6 | executeSync, 7 | defaultFieldResolver, 8 | defaultTypeResolver, 9 | } from './execute'; 10 | 11 | export type { 12 | ExecutionArgs, 13 | ExecutionResult, 14 | FormattedExecutionResult, 15 | } from './execute'; 16 | 17 | export { getDirectiveValues } from './values'; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/execution/index.mjs: -------------------------------------------------------------------------------- 1 | export { pathToArray as responsePathAsArray } from "../jsutils/Path.mjs"; 2 | export { execute, executeSync, defaultFieldResolver, defaultTypeResolver } from "./execute.mjs"; 3 | export { getDirectiveValues } from "./values.mjs"; 4 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/Maybe.d.ts: -------------------------------------------------------------------------------- 1 | // Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/ 2 | export type Maybe = null | undefined | T; 3 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/ObjMap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/ObjMap.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export type ObjMap = { [key: string]: T, __proto__: null, ... }; 3 | export type ObjMapLike = ObjMap | { [key: string]: T, ... }; 4 | 5 | export type ReadOnlyObjMap = { +[key: string]: T, __proto__: null, ... }; 6 | export type ReadOnlyObjMapLike = 7 | | ReadOnlyObjMap 8 | | { +[key: string]: T, ... }; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/ObjMap.mjs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/Path.d.ts: -------------------------------------------------------------------------------- 1 | export interface Path { 2 | prev: Path | undefined; 3 | key: string | number; 4 | typename: string | undefined; 5 | } 6 | 7 | /** 8 | * Given a Path and a key, return a new Path containing the new key. 9 | */ 10 | export function addPath( 11 | prev: Path | undefined, 12 | key: string | number, 13 | typename: string | undefined, 14 | ): Path; 15 | 16 | /** 17 | * Given a Path, return an Array of the path keys. 18 | */ 19 | export function pathToArray(path: Path): Array; 20 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/Path.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.addPath = addPath; 7 | exports.pathToArray = pathToArray; 8 | 9 | /** 10 | * Given a Path and a key, return a new Path containing the new key. 11 | */ 12 | function addPath(prev, key, typename) { 13 | return { 14 | prev: prev, 15 | key: key, 16 | typename: typename 17 | }; 18 | } 19 | /** 20 | * Given a Path, return an Array of the path keys. 21 | */ 22 | 23 | 24 | function pathToArray(path) { 25 | var flattened = []; 26 | var curr = path; 27 | 28 | while (curr) { 29 | flattened.push(curr.key); 30 | curr = curr.prev; 31 | } 32 | 33 | return flattened.reverse(); 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/Path.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export type Path = {| 3 | +prev: Path | void, 4 | +key: string | number, 5 | +typename: string | void, 6 | |}; 7 | 8 | /** 9 | * Given a Path and a key, return a new Path containing the new key. 10 | */ 11 | export function addPath( 12 | prev: $ReadOnly | void, 13 | key: string | number, 14 | typename: string | void, 15 | ): Path { 16 | return { prev, key, typename }; 17 | } 18 | 19 | /** 20 | * Given a Path, return an Array of the path keys. 21 | */ 22 | export function pathToArray(path: ?$ReadOnly): Array { 23 | const flattened = []; 24 | let curr = path; 25 | while (curr) { 26 | flattened.push(curr.key); 27 | curr = curr.prev; 28 | } 29 | return flattened.reverse(); 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/Path.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Given a Path and a key, return a new Path containing the new key. 3 | */ 4 | export function addPath(prev, key, typename) { 5 | return { 6 | prev: prev, 7 | key: key, 8 | typename: typename 9 | }; 10 | } 11 | /** 12 | * Given a Path, return an Array of the path keys. 13 | */ 14 | 15 | export function pathToArray(path) { 16 | var flattened = []; 17 | var curr = path; 18 | 19 | while (curr) { 20 | flattened.push(curr.key); 21 | curr = curr.prev; 22 | } 23 | 24 | return flattened.reverse(); 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/PromiseOrValue.d.ts: -------------------------------------------------------------------------------- 1 | export type PromiseOrValue = Promise | T; 2 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/PromiseOrValue.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/PromiseOrValue.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export type PromiseOrValue<+T> = Promise | T; 3 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/PromiseOrValue.mjs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/defineInspect.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = defineInspect; 7 | 8 | var _invariant = _interopRequireDefault(require("./invariant.js")); 9 | 10 | var _nodejsCustomInspectSymbol = _interopRequireDefault(require("./nodejsCustomInspectSymbol.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | /** 15 | * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON` 16 | */ 17 | function defineInspect(classObject) { 18 | var fn = classObject.prototype.toJSON; 19 | typeof fn === 'function' || (0, _invariant.default)(0); 20 | classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317') 21 | 22 | if (_nodejsCustomInspectSymbol.default) { 23 | classObject.prototype[_nodejsCustomInspectSymbol.default] = fn; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/defineInspect.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import invariant from './invariant'; 3 | import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol'; 4 | 5 | /** 6 | * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON` 7 | */ 8 | export default function defineInspect( 9 | classObject: Class | ((...args: Array) => mixed), 10 | ): void { 11 | const fn = classObject.prototype.toJSON; 12 | invariant(typeof fn === 'function'); 13 | 14 | classObject.prototype.inspect = fn; 15 | 16 | // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317') 17 | if (nodejsCustomInspectSymbol) { 18 | classObject.prototype[nodejsCustomInspectSymbol] = fn; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/defineInspect.mjs: -------------------------------------------------------------------------------- 1 | import invariant from "./invariant.mjs"; 2 | import nodejsCustomInspectSymbol from "./nodejsCustomInspectSymbol.mjs"; 3 | /** 4 | * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON` 5 | */ 6 | 7 | export default function defineInspect(classObject) { 8 | var fn = classObject.prototype.toJSON; 9 | typeof fn === 'function' || invariant(0); 10 | classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317') 11 | 12 | if (nodejsCustomInspectSymbol) { 13 | classObject.prototype[nodejsCustomInspectSymbol] = fn; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/devAssert.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = devAssert; 7 | 8 | function devAssert(condition, message) { 9 | var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 10 | 11 | if (!booleanCondition) { 12 | throw new Error(message); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/devAssert.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export default function devAssert(condition: mixed, message: string): void { 3 | const booleanCondition = Boolean(condition); 4 | // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 5 | if (!booleanCondition) { 6 | throw new Error(message); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/devAssert.mjs: -------------------------------------------------------------------------------- 1 | export default function devAssert(condition, message) { 2 | var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 3 | 4 | if (!booleanCondition) { 5 | throw new Error(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/didYouMean.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = didYouMean; 7 | var MAX_SUGGESTIONS = 5; 8 | /** 9 | * Given [ A, B, C ] return ' Did you mean A, B, or C?'. 10 | */ 11 | 12 | // eslint-disable-next-line no-redeclare 13 | function didYouMean(firstArg, secondArg) { 14 | var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg], 15 | subMessage = _ref[0], 16 | suggestionsArg = _ref[1]; 17 | 18 | var message = ' Did you mean '; 19 | 20 | if (subMessage) { 21 | message += subMessage + ' '; 22 | } 23 | 24 | var suggestions = suggestionsArg.map(function (x) { 25 | return "\"".concat(x, "\""); 26 | }); 27 | 28 | switch (suggestions.length) { 29 | case 0: 30 | return ''; 31 | 32 | case 1: 33 | return message + suggestions[0] + '?'; 34 | 35 | case 2: 36 | return message + suggestions[0] + ' or ' + suggestions[1] + '?'; 37 | } 38 | 39 | var selected = suggestions.slice(0, MAX_SUGGESTIONS); 40 | var lastItem = selected.pop(); 41 | return message + selected.join(', ') + ', or ' + lastItem + '?'; 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/didYouMean.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | const MAX_SUGGESTIONS = 5; 3 | 4 | /** 5 | * Given [ A, B, C ] return ' Did you mean A, B, or C?'. 6 | */ 7 | declare function didYouMean(suggestions: $ReadOnlyArray): string; 8 | // eslint-disable-next-line no-redeclare 9 | declare function didYouMean( 10 | subMessage: string, 11 | suggestions: $ReadOnlyArray, 12 | ): string; 13 | 14 | // eslint-disable-next-line no-redeclare 15 | export default function didYouMean(firstArg, secondArg) { 16 | const [subMessage, suggestionsArg] = 17 | typeof firstArg === 'string' 18 | ? [firstArg, secondArg] 19 | : [undefined, firstArg]; 20 | 21 | let message = ' Did you mean '; 22 | if (subMessage) { 23 | message += subMessage + ' '; 24 | } 25 | 26 | const suggestions = suggestionsArg.map((x) => `"${x}"`); 27 | switch (suggestions.length) { 28 | case 0: 29 | return ''; 30 | case 1: 31 | return message + suggestions[0] + '?'; 32 | case 2: 33 | return message + suggestions[0] + ' or ' + suggestions[1] + '?'; 34 | } 35 | 36 | const selected = suggestions.slice(0, MAX_SUGGESTIONS); 37 | const lastItem = selected.pop(); 38 | return message + selected.join(', ') + ', or ' + lastItem + '?'; 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/didYouMean.mjs: -------------------------------------------------------------------------------- 1 | var MAX_SUGGESTIONS = 5; 2 | /** 3 | * Given [ A, B, C ] return ' Did you mean A, B, or C?'. 4 | */ 5 | 6 | // eslint-disable-next-line no-redeclare 7 | export default function didYouMean(firstArg, secondArg) { 8 | var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg], 9 | subMessage = _ref[0], 10 | suggestionsArg = _ref[1]; 11 | 12 | var message = ' Did you mean '; 13 | 14 | if (subMessage) { 15 | message += subMessage + ' '; 16 | } 17 | 18 | var suggestions = suggestionsArg.map(function (x) { 19 | return "\"".concat(x, "\""); 20 | }); 21 | 22 | switch (suggestions.length) { 23 | case 0: 24 | return ''; 25 | 26 | case 1: 27 | return message + suggestions[0] + '?'; 28 | 29 | case 2: 30 | return message + suggestions[0] + ' or ' + suggestions[1] + '?'; 31 | } 32 | 33 | var selected = suggestions.slice(0, MAX_SUGGESTIONS); 34 | var lastItem = selected.pop(); 35 | return message + selected.join(', ') + ', or ' + lastItem + '?'; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/identityFunc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = identityFunc; 7 | 8 | /** 9 | * Returns the first argument it receives. 10 | */ 11 | function identityFunc(x) { 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/identityFunc.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Returns the first argument it receives. 4 | */ 5 | export default function identityFunc(x: T): T { 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/identityFunc.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the first argument it receives. 3 | */ 4 | export default function identityFunc(x) { 5 | return x; 6 | } 7 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/invariant.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = invariant; 7 | 8 | function invariant(condition, message) { 9 | var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 10 | 11 | if (!booleanCondition) { 12 | throw new Error(message != null ? message : 'Unexpected invariant triggered.'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/invariant.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export default function invariant(condition: mixed, message?: string): void { 3 | const booleanCondition = Boolean(condition); 4 | // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 5 | if (!booleanCondition) { 6 | throw new Error( 7 | message != null ? message : 'Unexpected invariant triggered.', 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/invariant.mjs: -------------------------------------------------------------------------------- 1 | export default function invariant(condition, message) { 2 | var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') 3 | 4 | if (!booleanCondition) { 5 | throw new Error(message != null ? message : 'Unexpected invariant triggered.'); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isAsyncIterable.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = isAsyncIterable; 7 | 8 | var _symbols = require("../polyfills/symbols.js"); 9 | 10 | // eslint-disable-next-line no-redeclare 11 | function isAsyncIterable(maybeAsyncIterable) { 12 | return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[_symbols.SYMBOL_ASYNC_ITERATOR]) === 'function'; 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isAsyncIterable.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { SYMBOL_ASYNC_ITERATOR } from '../polyfills/symbols'; 3 | 4 | /** 5 | * Returns true if the provided object implements the AsyncIterator protocol via 6 | * either implementing a `Symbol.asyncIterator` or `"@@asyncIterator"` method. 7 | */ 8 | declare function isAsyncIterable(value: mixed): boolean %checks(value instanceof 9 | AsyncIterable); 10 | 11 | // eslint-disable-next-line no-redeclare 12 | export default function isAsyncIterable(maybeAsyncIterable) { 13 | return typeof maybeAsyncIterable?.[SYMBOL_ASYNC_ITERATOR] === 'function'; 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isAsyncIterable.mjs: -------------------------------------------------------------------------------- 1 | import { SYMBOL_ASYNC_ITERATOR } from "../polyfills/symbols.mjs"; 2 | /** 3 | * Returns true if the provided object implements the AsyncIterator protocol via 4 | * either implementing a `Symbol.asyncIterator` or `"@@asyncIterator"` method. 5 | */ 6 | 7 | // eslint-disable-next-line no-redeclare 8 | export default function isAsyncIterable(maybeAsyncIterable) { 9 | return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[SYMBOL_ASYNC_ITERATOR]) === 'function'; 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isObjectLike.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = isObjectLike; 7 | 8 | function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 9 | 10 | /** 11 | * Return true if `value` is object-like. A value is object-like if it's not 12 | * `null` and has a `typeof` result of "object". 13 | */ 14 | function isObjectLike(value) { 15 | return _typeof(value) == 'object' && value !== null; 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isObjectLike.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Return true if `value` is object-like. A value is object-like if it's not 4 | * `null` and has a `typeof` result of "object". 5 | */ 6 | export default function isObjectLike(value: mixed): boolean %checks { 7 | return typeof value == 'object' && value !== null; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isObjectLike.mjs: -------------------------------------------------------------------------------- 1 | function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 2 | 3 | /** 4 | * Return true if `value` is object-like. A value is object-like if it's not 5 | * `null` and has a `typeof` result of "object". 6 | */ 7 | export default function isObjectLike(value) { 8 | return _typeof(value) == 'object' && value !== null; 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isPromise.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = isPromise; 7 | 8 | /** 9 | * Returns true if the value acts like a Promise, i.e. has a "then" function, 10 | * otherwise returns false. 11 | */ 12 | // eslint-disable-next-line no-redeclare 13 | function isPromise(value) { 14 | return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function'; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isPromise.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Returns true if the value acts like a Promise, i.e. has a "then" function, 4 | * otherwise returns false. 5 | */ 6 | declare function isPromise(value: mixed): boolean %checks(value instanceof 7 | Promise); 8 | 9 | // eslint-disable-next-line no-redeclare 10 | export default function isPromise(value) { 11 | return typeof value?.then === 'function'; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/isPromise.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns true if the value acts like a Promise, i.e. has a "then" function, 3 | * otherwise returns false. 4 | */ 5 | // eslint-disable-next-line no-redeclare 6 | export default function isPromise(value) { 7 | return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function'; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyMap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = keyMap; 7 | 8 | /** 9 | * Creates a keyed JS object from an array, given a function to produce the keys 10 | * for each value in the array. 11 | * 12 | * This provides a convenient lookup for the array items if the key function 13 | * produces unique results. 14 | * 15 | * const phoneBook = [ 16 | * { name: 'Jon', num: '555-1234' }, 17 | * { name: 'Jenny', num: '867-5309' } 18 | * ] 19 | * 20 | * // { Jon: { name: 'Jon', num: '555-1234' }, 21 | * // Jenny: { name: 'Jenny', num: '867-5309' } } 22 | * const entriesByName = keyMap( 23 | * phoneBook, 24 | * entry => entry.name 25 | * ) 26 | * 27 | * // { name: 'Jenny', num: '857-6309' } 28 | * const jennyEntry = entriesByName['Jenny'] 29 | * 30 | */ 31 | function keyMap(list, keyFn) { 32 | return list.reduce(function (map, item) { 33 | map[keyFn(item)] = item; 34 | return map; 35 | }, Object.create(null)); 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyMap.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { ObjMap } from './ObjMap'; 3 | 4 | /** 5 | * Creates a keyed JS object from an array, given a function to produce the keys 6 | * for each value in the array. 7 | * 8 | * This provides a convenient lookup for the array items if the key function 9 | * produces unique results. 10 | * 11 | * const phoneBook = [ 12 | * { name: 'Jon', num: '555-1234' }, 13 | * { name: 'Jenny', num: '867-5309' } 14 | * ] 15 | * 16 | * // { Jon: { name: 'Jon', num: '555-1234' }, 17 | * // Jenny: { name: 'Jenny', num: '867-5309' } } 18 | * const entriesByName = keyMap( 19 | * phoneBook, 20 | * entry => entry.name 21 | * ) 22 | * 23 | * // { name: 'Jenny', num: '857-6309' } 24 | * const jennyEntry = entriesByName['Jenny'] 25 | * 26 | */ 27 | export default function keyMap( 28 | list: $ReadOnlyArray, 29 | keyFn: (item: T) => string, 30 | ): ObjMap { 31 | return list.reduce((map, item) => { 32 | map[keyFn(item)] = item; 33 | return map; 34 | }, Object.create(null)); 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyMap.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Creates a keyed JS object from an array, given a function to produce the keys 3 | * for each value in the array. 4 | * 5 | * This provides a convenient lookup for the array items if the key function 6 | * produces unique results. 7 | * 8 | * const phoneBook = [ 9 | * { name: 'Jon', num: '555-1234' }, 10 | * { name: 'Jenny', num: '867-5309' } 11 | * ] 12 | * 13 | * // { Jon: { name: 'Jon', num: '555-1234' }, 14 | * // Jenny: { name: 'Jenny', num: '867-5309' } } 15 | * const entriesByName = keyMap( 16 | * phoneBook, 17 | * entry => entry.name 18 | * ) 19 | * 20 | * // { name: 'Jenny', num: '857-6309' } 21 | * const jennyEntry = entriesByName['Jenny'] 22 | * 23 | */ 24 | export default function keyMap(list, keyFn) { 25 | return list.reduce(function (map, item) { 26 | map[keyFn(item)] = item; 27 | return map; 28 | }, Object.create(null)); 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyValMap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = keyValMap; 7 | 8 | /** 9 | * Creates a keyed JS object from an array, given a function to produce the keys 10 | * and a function to produce the values from each item in the array. 11 | * 12 | * const phoneBook = [ 13 | * { name: 'Jon', num: '555-1234' }, 14 | * { name: 'Jenny', num: '867-5309' } 15 | * ] 16 | * 17 | * // { Jon: '555-1234', Jenny: '867-5309' } 18 | * const phonesByName = keyValMap( 19 | * phoneBook, 20 | * entry => entry.name, 21 | * entry => entry.num 22 | * ) 23 | * 24 | */ 25 | function keyValMap(list, keyFn, valFn) { 26 | return list.reduce(function (map, item) { 27 | map[keyFn(item)] = valFn(item); 28 | return map; 29 | }, Object.create(null)); 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyValMap.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { ObjMap } from './ObjMap'; 3 | 4 | /** 5 | * Creates a keyed JS object from an array, given a function to produce the keys 6 | * and a function to produce the values from each item in the array. 7 | * 8 | * const phoneBook = [ 9 | * { name: 'Jon', num: '555-1234' }, 10 | * { name: 'Jenny', num: '867-5309' } 11 | * ] 12 | * 13 | * // { Jon: '555-1234', Jenny: '867-5309' } 14 | * const phonesByName = keyValMap( 15 | * phoneBook, 16 | * entry => entry.name, 17 | * entry => entry.num 18 | * ) 19 | * 20 | */ 21 | export default function keyValMap( 22 | list: $ReadOnlyArray, 23 | keyFn: (item: T) => string, 24 | valFn: (item: T) => V, 25 | ): ObjMap { 26 | return list.reduce((map, item) => { 27 | map[keyFn(item)] = valFn(item); 28 | return map; 29 | }, Object.create(null)); 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/keyValMap.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Creates a keyed JS object from an array, given a function to produce the keys 3 | * and a function to produce the values from each item in the array. 4 | * 5 | * const phoneBook = [ 6 | * { name: 'Jon', num: '555-1234' }, 7 | * { name: 'Jenny', num: '867-5309' } 8 | * ] 9 | * 10 | * // { Jon: '555-1234', Jenny: '867-5309' } 11 | * const phonesByName = keyValMap( 12 | * phoneBook, 13 | * entry => entry.name, 14 | * entry => entry.num 15 | * ) 16 | * 17 | */ 18 | export default function keyValMap(list, keyFn, valFn) { 19 | return list.reduce(function (map, item) { 20 | map[keyFn(item)] = valFn(item); 21 | return map; 22 | }, Object.create(null)); 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/mapValue.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = mapValue; 7 | 8 | var _objectEntries3 = _interopRequireDefault(require("../polyfills/objectEntries.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | /** 13 | * Creates an object map with the same keys as `map` and values generated by 14 | * running each value of `map` thru `fn`. 15 | */ 16 | function mapValue(map, fn) { 17 | var result = Object.create(null); 18 | 19 | for (var _i2 = 0, _objectEntries2 = (0, _objectEntries3.default)(map); _i2 < _objectEntries2.length; _i2++) { 20 | var _ref2 = _objectEntries2[_i2]; 21 | var _key = _ref2[0]; 22 | var _value = _ref2[1]; 23 | result[_key] = fn(_value, _key); 24 | } 25 | 26 | return result; 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/mapValue.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import objectEntries from '../polyfills/objectEntries'; 3 | 4 | import type { ObjMap } from './ObjMap'; 5 | 6 | /** 7 | * Creates an object map with the same keys as `map` and values generated by 8 | * running each value of `map` thru `fn`. 9 | */ 10 | export default function mapValue( 11 | map: ObjMap, 12 | fn: (value: T, key: string) => V, 13 | ): ObjMap { 14 | const result = Object.create(null); 15 | 16 | for (const [key, value] of objectEntries(map)) { 17 | result[key] = fn(value, key); 18 | } 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/mapValue.mjs: -------------------------------------------------------------------------------- 1 | import objectEntries from "../polyfills/objectEntries.mjs"; 2 | 3 | /** 4 | * Creates an object map with the same keys as `map` and values generated by 5 | * running each value of `map` thru `fn`. 6 | */ 7 | export default function mapValue(map, fn) { 8 | var result = Object.create(null); 9 | 10 | for (var _i2 = 0, _objectEntries2 = objectEntries(map); _i2 < _objectEntries2.length; _i2++) { 11 | var _ref2 = _objectEntries2[_i2]; 12 | var _key = _ref2[0]; 13 | var _value = _ref2[1]; 14 | result[_key] = fn(_value, _key); 15 | } 16 | 17 | return result; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/memoize3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = memoize3; 7 | 8 | /** 9 | * Memoizes the provided three-argument function. 10 | */ 11 | function memoize3(fn) { 12 | var cache0; 13 | return function memoized(a1, a2, a3) { 14 | if (!cache0) { 15 | cache0 = new WeakMap(); 16 | } 17 | 18 | var cache1 = cache0.get(a1); 19 | var cache2; 20 | 21 | if (cache1) { 22 | cache2 = cache1.get(a2); 23 | 24 | if (cache2) { 25 | var cachedValue = cache2.get(a3); 26 | 27 | if (cachedValue !== undefined) { 28 | return cachedValue; 29 | } 30 | } 31 | } else { 32 | cache1 = new WeakMap(); 33 | cache0.set(a1, cache1); 34 | } 35 | 36 | if (!cache2) { 37 | cache2 = new WeakMap(); 38 | cache1.set(a2, cache2); 39 | } 40 | 41 | var newValue = fn(a1, a2, a3); 42 | cache2.set(a3, newValue); 43 | return newValue; 44 | }; 45 | } 46 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/memoize3.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Memoizes the provided three-argument function. 4 | */ 5 | export default function memoize3< 6 | A1: { ... } | $ReadOnlyArray, 7 | A2: { ... } | $ReadOnlyArray, 8 | A3: { ... } | $ReadOnlyArray, 9 | R: mixed, 10 | >(fn: (A1, A2, A3) => R): (A1, A2, A3) => R { 11 | let cache0; 12 | 13 | return function memoized(a1, a2, a3) { 14 | if (!cache0) { 15 | cache0 = new WeakMap(); 16 | } 17 | let cache1 = cache0.get(a1); 18 | let cache2; 19 | if (cache1) { 20 | cache2 = cache1.get(a2); 21 | if (cache2) { 22 | const cachedValue = cache2.get(a3); 23 | if (cachedValue !== undefined) { 24 | return cachedValue; 25 | } 26 | } 27 | } else { 28 | cache1 = new WeakMap(); 29 | cache0.set(a1, cache1); 30 | } 31 | if (!cache2) { 32 | cache2 = new WeakMap(); 33 | cache1.set(a2, cache2); 34 | } 35 | const newValue = fn(a1, a2, a3); 36 | cache2.set(a3, newValue); 37 | return newValue; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/memoize3.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Memoizes the provided three-argument function. 3 | */ 4 | export default function memoize3(fn) { 5 | var cache0; 6 | return function memoized(a1, a2, a3) { 7 | if (!cache0) { 8 | cache0 = new WeakMap(); 9 | } 10 | 11 | var cache1 = cache0.get(a1); 12 | var cache2; 13 | 14 | if (cache1) { 15 | cache2 = cache1.get(a2); 16 | 17 | if (cache2) { 18 | var cachedValue = cache2.get(a3); 19 | 20 | if (cachedValue !== undefined) { 21 | return cachedValue; 22 | } 23 | } 24 | } else { 25 | cache1 = new WeakMap(); 26 | cache0.set(a1, cache1); 27 | } 28 | 29 | if (!cache2) { 30 | cache2 = new WeakMap(); 31 | cache1.set(a2, cache2); 32 | } 33 | 34 | var newValue = fn(a1, a2, a3); 35 | cache2.set(a3, newValue); 36 | return newValue; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 8 | var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined; 9 | var _default = nodejsCustomInspectSymbol; 10 | exports.default = _default; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 3 | const nodejsCustomInspectSymbol = 4 | typeof Symbol === 'function' && typeof Symbol.for === 'function' 5 | ? Symbol.for('nodejs.util.inspect.custom') 6 | : undefined; 7 | 8 | export default nodejsCustomInspectSymbol; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/nodejsCustomInspectSymbol.mjs: -------------------------------------------------------------------------------- 1 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 2 | var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined; 3 | export default nodejsCustomInspectSymbol; 4 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/printPathArray.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = printPathArray; 7 | 8 | /** 9 | * Build a string describing the path. 10 | */ 11 | function printPathArray(path) { 12 | return path.map(function (key) { 13 | return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key; 14 | }).join(''); 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/printPathArray.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Build a string describing the path. 4 | */ 5 | export default function printPathArray( 6 | path: $ReadOnlyArray, 7 | ): string { 8 | return path 9 | .map((key) => 10 | typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key, 11 | ) 12 | .join(''); 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/printPathArray.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Build a string describing the path. 3 | */ 4 | export default function printPathArray(path) { 5 | return path.map(function (key) { 6 | return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key; 7 | }).join(''); 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseForObject.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = promiseForObject; 7 | 8 | /** 9 | * This function transforms a JS object `ObjMap>` into 10 | * a `Promise>` 11 | * 12 | * This is akin to bluebird's `Promise.props`, but implemented only using 13 | * `Promise.all` so it will work with any implementation of ES6 promises. 14 | */ 15 | function promiseForObject(object) { 16 | var keys = Object.keys(object); 17 | var valuesAndPromises = keys.map(function (name) { 18 | return object[name]; 19 | }); 20 | return Promise.all(valuesAndPromises).then(function (values) { 21 | return values.reduce(function (resolvedObject, value, i) { 22 | resolvedObject[keys[i]] = value; 23 | return resolvedObject; 24 | }, Object.create(null)); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseForObject.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { ObjMap } from './ObjMap'; 3 | 4 | /** 5 | * This function transforms a JS object `ObjMap>` into 6 | * a `Promise>` 7 | * 8 | * This is akin to bluebird's `Promise.props`, but implemented only using 9 | * `Promise.all` so it will work with any implementation of ES6 promises. 10 | */ 11 | export default function promiseForObject( 12 | object: ObjMap>, 13 | ): Promise> { 14 | const keys = Object.keys(object); 15 | const valuesAndPromises = keys.map((name) => object[name]); 16 | return Promise.all(valuesAndPromises).then((values) => 17 | values.reduce((resolvedObject, value, i) => { 18 | resolvedObject[keys[i]] = value; 19 | return resolvedObject; 20 | }, Object.create(null)), 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseForObject.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * This function transforms a JS object `ObjMap>` into 3 | * a `Promise>` 4 | * 5 | * This is akin to bluebird's `Promise.props`, but implemented only using 6 | * `Promise.all` so it will work with any implementation of ES6 promises. 7 | */ 8 | export default function promiseForObject(object) { 9 | var keys = Object.keys(object); 10 | var valuesAndPromises = keys.map(function (name) { 11 | return object[name]; 12 | }); 13 | return Promise.all(valuesAndPromises).then(function (values) { 14 | return values.reduce(function (resolvedObject, value, i) { 15 | resolvedObject[keys[i]] = value; 16 | return resolvedObject; 17 | }, Object.create(null)); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseReduce.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = promiseReduce; 7 | 8 | var _isPromise = _interopRequireDefault(require("./isPromise.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | /** 13 | * Similar to Array.prototype.reduce(), however the reducing callback may return 14 | * a Promise, in which case reduction will continue after each promise resolves. 15 | * 16 | * If the callback does not return a Promise, then this function will also not 17 | * return a Promise. 18 | */ 19 | function promiseReduce(values, callback, initialValue) { 20 | return values.reduce(function (previous, value) { 21 | return (0, _isPromise.default)(previous) ? previous.then(function (resolved) { 22 | return callback(resolved, value); 23 | }) : callback(previous, value); 24 | }, initialValue); 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseReduce.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { PromiseOrValue } from './PromiseOrValue'; 3 | 4 | import isPromise from './isPromise'; 5 | 6 | /** 7 | * Similar to Array.prototype.reduce(), however the reducing callback may return 8 | * a Promise, in which case reduction will continue after each promise resolves. 9 | * 10 | * If the callback does not return a Promise, then this function will also not 11 | * return a Promise. 12 | */ 13 | export default function promiseReduce( 14 | values: $ReadOnlyArray, 15 | callback: (U, T) => PromiseOrValue, 16 | initialValue: PromiseOrValue, 17 | ): PromiseOrValue { 18 | return values.reduce( 19 | (previous, value) => 20 | isPromise(previous) 21 | ? previous.then((resolved) => callback(resolved, value)) 22 | : callback(previous, value), 23 | initialValue, 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/promiseReduce.mjs: -------------------------------------------------------------------------------- 1 | import isPromise from "./isPromise.mjs"; 2 | /** 3 | * Similar to Array.prototype.reduce(), however the reducing callback may return 4 | * a Promise, in which case reduction will continue after each promise resolves. 5 | * 6 | * If the callback does not return a Promise, then this function will also not 7 | * return a Promise. 8 | */ 9 | 10 | export default function promiseReduce(values, callback, initialValue) { 11 | return values.reduce(function (previous, value) { 12 | return isPromise(previous) ? previous.then(function (resolved) { 13 | return callback(resolved, value); 14 | }) : callback(previous, value); 15 | }, initialValue); 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/toObjMap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = toObjMap; 7 | 8 | var _objectEntries3 = _interopRequireDefault(require("../polyfills/objectEntries.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function toObjMap(obj) { 13 | /* eslint-enable no-redeclare */ 14 | if (Object.getPrototypeOf(obj) === null) { 15 | return obj; 16 | } 17 | 18 | var map = Object.create(null); 19 | 20 | for (var _i2 = 0, _objectEntries2 = (0, _objectEntries3.default)(obj); _i2 < _objectEntries2.length; _i2++) { 21 | var _ref2 = _objectEntries2[_i2]; 22 | var key = _ref2[0]; 23 | var value = _ref2[1]; 24 | map[key] = value; 25 | } 26 | 27 | return map; 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/toObjMap.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import objectEntries from '../polyfills/objectEntries'; 3 | 4 | import type { 5 | ObjMap, 6 | ObjMapLike, 7 | ReadOnlyObjMap, 8 | ReadOnlyObjMapLike, 9 | } from './ObjMap'; 10 | 11 | /* eslint-disable no-redeclare */ 12 | declare function toObjMap(obj: ObjMapLike): ObjMap; 13 | declare function toObjMap(obj: ReadOnlyObjMapLike): ReadOnlyObjMap; 14 | 15 | export default function toObjMap(obj) { 16 | /* eslint-enable no-redeclare */ 17 | if (Object.getPrototypeOf(obj) === null) { 18 | return obj; 19 | } 20 | 21 | const map = Object.create(null); 22 | for (const [key, value] of objectEntries(obj)) { 23 | map[key] = value; 24 | } 25 | return map; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/jsutils/toObjMap.mjs: -------------------------------------------------------------------------------- 1 | import objectEntries from "../polyfills/objectEntries.mjs"; 2 | export default function toObjMap(obj) { 3 | /* eslint-enable no-redeclare */ 4 | if (Object.getPrototypeOf(obj) === null) { 5 | return obj; 6 | } 7 | 8 | var map = Object.create(null); 9 | 10 | for (var _i2 = 0, _objectEntries2 = objectEntries(obj); _i2 < _objectEntries2.length; _i2++) { 11 | var _ref2 = _objectEntries2[_i2]; 12 | var key = _ref2[0]; 13 | var value = _ref2[1]; 14 | map[key] = value; 15 | } 16 | 17 | return map; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/graphql/language/blockString.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Produces the value of a block string from its parsed raw value, similar to 3 | * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. 4 | * 5 | * This implements the GraphQL spec's BlockStringValue() static algorithm. 6 | */ 7 | export function dedentBlockStringValue(rawString: string): string; 8 | 9 | /** 10 | * @internal 11 | */ 12 | export function getBlockStringIndentation(body: string): number; 13 | 14 | /** 15 | * Print a block string in the indented block form by adding a leading and 16 | * trailing blank line. However, if a block string starts with whitespace and is 17 | * a single-line, adding a leading blank line would strip that whitespace. 18 | */ 19 | export function printBlockString( 20 | value: string, 21 | indentation?: string, 22 | preferMultipleLines?: boolean, 23 | ): string; 24 | -------------------------------------------------------------------------------- /node_modules/graphql/language/directiveLocation.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The set of allowed directive location values. 3 | */ 4 | export const DirectiveLocation: { 5 | // Request Definitions 6 | QUERY: 'QUERY'; 7 | MUTATION: 'MUTATION'; 8 | SUBSCRIPTION: 'SUBSCRIPTION'; 9 | FIELD: 'FIELD'; 10 | FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION'; 11 | FRAGMENT_SPREAD: 'FRAGMENT_SPREAD'; 12 | INLINE_FRAGMENT: 'INLINE_FRAGMENT'; 13 | VARIABLE_DEFINITION: 'VARIABLE_DEFINITION'; 14 | 15 | // Type System Definitions 16 | SCHEMA: 'SCHEMA'; 17 | SCALAR: 'SCALAR'; 18 | OBJECT: 'OBJECT'; 19 | FIELD_DEFINITION: 'FIELD_DEFINITION'; 20 | ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION'; 21 | INTERFACE: 'INTERFACE'; 22 | UNION: 'UNION'; 23 | ENUM: 'ENUM'; 24 | ENUM_VALUE: 'ENUM_VALUE'; 25 | INPUT_OBJECT: 'INPUT_OBJECT'; 26 | INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'; 27 | }; 28 | 29 | /** 30 | * The enum type representing the directive location values. 31 | */ 32 | export type DirectiveLocationEnum = typeof DirectiveLocation[keyof typeof DirectiveLocation]; 33 | -------------------------------------------------------------------------------- /node_modules/graphql/language/directiveLocation.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.DirectiveLocation = void 0; 7 | 8 | /** 9 | * The set of allowed directive location values. 10 | */ 11 | var DirectiveLocation = Object.freeze({ 12 | // Request Definitions 13 | QUERY: 'QUERY', 14 | MUTATION: 'MUTATION', 15 | SUBSCRIPTION: 'SUBSCRIPTION', 16 | FIELD: 'FIELD', 17 | FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION', 18 | FRAGMENT_SPREAD: 'FRAGMENT_SPREAD', 19 | INLINE_FRAGMENT: 'INLINE_FRAGMENT', 20 | VARIABLE_DEFINITION: 'VARIABLE_DEFINITION', 21 | // Type System Definitions 22 | SCHEMA: 'SCHEMA', 23 | SCALAR: 'SCALAR', 24 | OBJECT: 'OBJECT', 25 | FIELD_DEFINITION: 'FIELD_DEFINITION', 26 | ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION', 27 | INTERFACE: 'INTERFACE', 28 | UNION: 'UNION', 29 | ENUM: 'ENUM', 30 | ENUM_VALUE: 'ENUM_VALUE', 31 | INPUT_OBJECT: 'INPUT_OBJECT', 32 | INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION' 33 | }); 34 | /** 35 | * The enum type representing the directive location values. 36 | */ 37 | 38 | exports.DirectiveLocation = DirectiveLocation; 39 | -------------------------------------------------------------------------------- /node_modules/graphql/language/directiveLocation.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * The set of allowed directive location values. 4 | */ 5 | export const DirectiveLocation = Object.freeze({ 6 | // Request Definitions 7 | QUERY: 'QUERY', 8 | MUTATION: 'MUTATION', 9 | SUBSCRIPTION: 'SUBSCRIPTION', 10 | FIELD: 'FIELD', 11 | FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION', 12 | FRAGMENT_SPREAD: 'FRAGMENT_SPREAD', 13 | INLINE_FRAGMENT: 'INLINE_FRAGMENT', 14 | VARIABLE_DEFINITION: 'VARIABLE_DEFINITION', 15 | // Type System Definitions 16 | SCHEMA: 'SCHEMA', 17 | SCALAR: 'SCALAR', 18 | OBJECT: 'OBJECT', 19 | FIELD_DEFINITION: 'FIELD_DEFINITION', 20 | ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION', 21 | INTERFACE: 'INTERFACE', 22 | UNION: 'UNION', 23 | ENUM: 'ENUM', 24 | ENUM_VALUE: 'ENUM_VALUE', 25 | INPUT_OBJECT: 'INPUT_OBJECT', 26 | INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION', 27 | }); 28 | 29 | /** 30 | * The enum type representing the directive location values. 31 | */ 32 | export type DirectiveLocationEnum = $Values; 33 | -------------------------------------------------------------------------------- /node_modules/graphql/language/directiveLocation.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * The set of allowed directive location values. 3 | */ 4 | export var DirectiveLocation = Object.freeze({ 5 | // Request Definitions 6 | QUERY: 'QUERY', 7 | MUTATION: 'MUTATION', 8 | SUBSCRIPTION: 'SUBSCRIPTION', 9 | FIELD: 'FIELD', 10 | FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION', 11 | FRAGMENT_SPREAD: 'FRAGMENT_SPREAD', 12 | INLINE_FRAGMENT: 'INLINE_FRAGMENT', 13 | VARIABLE_DEFINITION: 'VARIABLE_DEFINITION', 14 | // Type System Definitions 15 | SCHEMA: 'SCHEMA', 16 | SCALAR: 'SCALAR', 17 | OBJECT: 'OBJECT', 18 | FIELD_DEFINITION: 'FIELD_DEFINITION', 19 | ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION', 20 | INTERFACE: 'INTERFACE', 21 | UNION: 'UNION', 22 | ENUM: 'ENUM', 23 | ENUM_VALUE: 'ENUM_VALUE', 24 | INPUT_OBJECT: 'INPUT_OBJECT', 25 | INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION' 26 | }); 27 | /** 28 | * The enum type representing the directive location values. 29 | */ 30 | -------------------------------------------------------------------------------- /node_modules/graphql/language/experimentalOnlineParser/index.d.ts: -------------------------------------------------------------------------------- 1 | export { 2 | OnlineParser, 3 | RuleKind, 4 | TokenKind, 5 | OnlineParserState, 6 | } from './onlineParser'; 7 | -------------------------------------------------------------------------------- /node_modules/graphql/language/experimentalOnlineParser/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "OnlineParser", { 7 | enumerable: true, 8 | get: function get() { 9 | return _onlineParser.OnlineParser; 10 | } 11 | }); 12 | Object.defineProperty(exports, "RuleKind", { 13 | enumerable: true, 14 | get: function get() { 15 | return _onlineParser.RuleKind; 16 | } 17 | }); 18 | Object.defineProperty(exports, "TokenKind", { 19 | enumerable: true, 20 | get: function get() { 21 | return _onlineParser.TokenKind; 22 | } 23 | }); 24 | Object.defineProperty(exports, "OnlineParserState", { 25 | enumerable: true, 26 | get: function get() { 27 | return _onlineParser.OnlineParserState; 28 | } 29 | }); 30 | 31 | var _onlineParser = require("./onlineParser.js"); 32 | -------------------------------------------------------------------------------- /node_modules/graphql/language/experimentalOnlineParser/index.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export { 3 | OnlineParser, 4 | RuleKind, 5 | TokenKind, 6 | OnlineParserState, 7 | } from './onlineParser'; 8 | -------------------------------------------------------------------------------- /node_modules/graphql/language/experimentalOnlineParser/index.mjs: -------------------------------------------------------------------------------- 1 | export { OnlineParser, RuleKind, TokenKind, OnlineParserState } from "./onlineParser.mjs"; 2 | -------------------------------------------------------------------------------- /node_modules/graphql/language/index.mjs: -------------------------------------------------------------------------------- 1 | export { Source } from "./source.mjs"; 2 | export { getLocation } from "./location.mjs"; 3 | export { printLocation, printSourceLocation } from "./printLocation.mjs"; 4 | export { Kind } from "./kinds.mjs"; 5 | export { TokenKind } from "./tokenKind.mjs"; 6 | export { Lexer } from "./lexer.mjs"; 7 | export { parse, parseValue, parseType } from "./parser.mjs"; 8 | export { print } from "./printer.mjs"; 9 | export { visit, visitInParallel, getVisitFn, BREAK } from "./visitor.mjs"; 10 | export { Location, Token } from "./ast.mjs"; 11 | export { isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from "./predicates.mjs"; 12 | export { DirectiveLocation } from "./directiveLocation.mjs"; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/language/location.d.ts: -------------------------------------------------------------------------------- 1 | import { Source } from './source'; 2 | 3 | /** 4 | * Represents a location in a Source. 5 | */ 6 | export interface SourceLocation { 7 | readonly line: number; 8 | readonly column: number; 9 | } 10 | 11 | /** 12 | * Takes a Source and a UTF-8 character offset, and returns the corresponding 13 | * line and column as a SourceLocation. 14 | */ 15 | export function getLocation(source: Source, position: number): SourceLocation; 16 | -------------------------------------------------------------------------------- /node_modules/graphql/language/location.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.getLocation = getLocation; 7 | 8 | /** 9 | * Represents a location in a Source. 10 | */ 11 | 12 | /** 13 | * Takes a Source and a UTF-8 character offset, and returns the corresponding 14 | * line and column as a SourceLocation. 15 | */ 16 | function getLocation(source, position) { 17 | var lineRegexp = /\r\n|[\n\r]/g; 18 | var line = 1; 19 | var column = position + 1; 20 | var match; 21 | 22 | while ((match = lineRegexp.exec(source.body)) && match.index < position) { 23 | line += 1; 24 | column = position + 1 - (match.index + match[0].length); 25 | } 26 | 27 | return { 28 | line: line, 29 | column: column 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/graphql/language/location.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { Source } from './source'; 3 | 4 | /** 5 | * Represents a location in a Source. 6 | */ 7 | export type SourceLocation = {| 8 | +line: number, 9 | +column: number, 10 | |}; 11 | 12 | /** 13 | * Takes a Source and a UTF-8 character offset, and returns the corresponding 14 | * line and column as a SourceLocation. 15 | */ 16 | export function getLocation(source: Source, position: number): SourceLocation { 17 | const lineRegexp = /\r\n|[\n\r]/g; 18 | let line = 1; 19 | let column = position + 1; 20 | let match; 21 | while ((match = lineRegexp.exec(source.body)) && match.index < position) { 22 | line += 1; 23 | column = position + 1 - (match.index + match[0].length); 24 | } 25 | return { line, column }; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/language/location.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Represents a location in a Source. 3 | */ 4 | 5 | /** 6 | * Takes a Source and a UTF-8 character offset, and returns the corresponding 7 | * line and column as a SourceLocation. 8 | */ 9 | export function getLocation(source, position) { 10 | var lineRegexp = /\r\n|[\n\r]/g; 11 | var line = 1; 12 | var column = position + 1; 13 | var match; 14 | 15 | while ((match = lineRegexp.exec(source.body)) && match.index < position) { 16 | line += 1; 17 | column = position + 1 - (match.index + match[0].length); 18 | } 19 | 20 | return { 21 | line: line, 22 | column: column 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/graphql/language/predicates.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ASTNode, 3 | DefinitionNode, 4 | ExecutableDefinitionNode, 5 | SelectionNode, 6 | ValueNode, 7 | TypeNode, 8 | TypeSystemDefinitionNode, 9 | TypeDefinitionNode, 10 | TypeSystemExtensionNode, 11 | TypeExtensionNode, 12 | } from './ast'; 13 | 14 | export function isDefinitionNode(node: ASTNode): node is DefinitionNode; 15 | 16 | export function isExecutableDefinitionNode( 17 | node: ASTNode, 18 | ): node is ExecutableDefinitionNode; 19 | 20 | export function isSelectionNode(node: ASTNode): node is SelectionNode; 21 | 22 | export function isValueNode(node: ASTNode): node is ValueNode; 23 | 24 | export function isTypeNode(node: ASTNode): node is TypeNode; 25 | 26 | export function isTypeSystemDefinitionNode( 27 | node: ASTNode, 28 | ): node is TypeSystemDefinitionNode; 29 | 30 | export function isTypeDefinitionNode(node: ASTNode): node is TypeDefinitionNode; 31 | 32 | export function isTypeSystemExtensionNode( 33 | node: ASTNode, 34 | ): node is TypeSystemExtensionNode; 35 | 36 | export function isTypeExtensionNode(node: ASTNode): node is TypeExtensionNode; 37 | -------------------------------------------------------------------------------- /node_modules/graphql/language/printLocation.d.ts: -------------------------------------------------------------------------------- 1 | import { Location } from './ast'; 2 | import { Source } from './source'; 3 | import { SourceLocation } from './location'; 4 | 5 | /** 6 | * Render a helpful description of the location in the GraphQL Source document. 7 | */ 8 | export function printLocation(location: Location): string; 9 | 10 | /** 11 | * Render a helpful description of the location in the GraphQL Source document. 12 | */ 13 | export function printSourceLocation( 14 | source: Source, 15 | sourceLocation: SourceLocation, 16 | ): string; 17 | -------------------------------------------------------------------------------- /node_modules/graphql/language/printer.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTNode } from './ast'; 2 | 3 | /** 4 | * Converts an AST into a string, using one set of reasonable 5 | * formatting rules. 6 | */ 7 | export function print(ast: ASTNode): string; 8 | -------------------------------------------------------------------------------- /node_modules/graphql/language/source.d.ts: -------------------------------------------------------------------------------- 1 | interface Location { 2 | line: number; 3 | column: number; 4 | } 5 | 6 | /** 7 | * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are 8 | * optional, but they are useful for clients who store GraphQL documents in source files. 9 | * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might 10 | * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`. 11 | * The `line` and `column` properties in `locationOffset` are 1-indexed. 12 | */ 13 | export class Source { 14 | body: string; 15 | name: string; 16 | locationOffset: Location; 17 | constructor(body: string, name?: string, locationOffset?: Location); 18 | } 19 | 20 | /** 21 | * Test if the given value is a Source object. 22 | * 23 | * @internal 24 | */ 25 | export function isSource(source: any): source is Source; 26 | -------------------------------------------------------------------------------- /node_modules/graphql/language/tokenKind.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * An exported enum describing the different kinds of tokens that the 3 | * lexer emits. 4 | */ 5 | export const TokenKind: { 6 | SOF: ''; 7 | EOF: ''; 8 | BANG: '!'; 9 | DOLLAR: '$'; 10 | AMP: '&'; 11 | PAREN_L: '('; 12 | PAREN_R: ')'; 13 | SPREAD: '...'; 14 | COLON: ':'; 15 | EQUALS: '='; 16 | AT: '@'; 17 | BRACKET_L: '['; 18 | BRACKET_R: ']'; 19 | BRACE_L: '{'; 20 | PIPE: '|'; 21 | BRACE_R: '}'; 22 | NAME: 'Name'; 23 | INT: 'Int'; 24 | FLOAT: 'Float'; 25 | STRING: 'String'; 26 | BLOCK_STRING: 'BlockString'; 27 | COMMENT: 'Comment'; 28 | }; 29 | 30 | /** 31 | * The enum type representing the token kinds values. 32 | */ 33 | export type TokenKindEnum = typeof TokenKind[keyof typeof TokenKind]; 34 | -------------------------------------------------------------------------------- /node_modules/graphql/language/tokenKind.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.TokenKind = void 0; 7 | 8 | /** 9 | * An exported enum describing the different kinds of tokens that the 10 | * lexer emits. 11 | */ 12 | var TokenKind = Object.freeze({ 13 | SOF: '', 14 | EOF: '', 15 | BANG: '!', 16 | DOLLAR: '$', 17 | AMP: '&', 18 | PAREN_L: '(', 19 | PAREN_R: ')', 20 | SPREAD: '...', 21 | COLON: ':', 22 | EQUALS: '=', 23 | AT: '@', 24 | BRACKET_L: '[', 25 | BRACKET_R: ']', 26 | BRACE_L: '{', 27 | PIPE: '|', 28 | BRACE_R: '}', 29 | NAME: 'Name', 30 | INT: 'Int', 31 | FLOAT: 'Float', 32 | STRING: 'String', 33 | BLOCK_STRING: 'BlockString', 34 | COMMENT: 'Comment' 35 | }); 36 | /** 37 | * The enum type representing the token kinds values. 38 | */ 39 | 40 | exports.TokenKind = TokenKind; 41 | -------------------------------------------------------------------------------- /node_modules/graphql/language/tokenKind.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * An exported enum describing the different kinds of tokens that the 4 | * lexer emits. 5 | */ 6 | export const TokenKind = Object.freeze({ 7 | SOF: '', 8 | EOF: '', 9 | BANG: '!', 10 | DOLLAR: '$', 11 | AMP: '&', 12 | PAREN_L: '(', 13 | PAREN_R: ')', 14 | SPREAD: '...', 15 | COLON: ':', 16 | EQUALS: '=', 17 | AT: '@', 18 | BRACKET_L: '[', 19 | BRACKET_R: ']', 20 | BRACE_L: '{', 21 | PIPE: '|', 22 | BRACE_R: '}', 23 | NAME: 'Name', 24 | INT: 'Int', 25 | FLOAT: 'Float', 26 | STRING: 'String', 27 | BLOCK_STRING: 'BlockString', 28 | COMMENT: 'Comment', 29 | }); 30 | 31 | /** 32 | * The enum type representing the token kinds values. 33 | */ 34 | export type TokenKindEnum = $Values; 35 | -------------------------------------------------------------------------------- /node_modules/graphql/language/tokenKind.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * An exported enum describing the different kinds of tokens that the 3 | * lexer emits. 4 | */ 5 | export var TokenKind = Object.freeze({ 6 | SOF: '', 7 | EOF: '', 8 | BANG: '!', 9 | DOLLAR: '$', 10 | AMP: '&', 11 | PAREN_L: '(', 12 | PAREN_R: ')', 13 | SPREAD: '...', 14 | COLON: ':', 15 | EQUALS: '=', 16 | AT: '@', 17 | BRACKET_L: '[', 18 | BRACKET_R: ']', 19 | BRACE_L: '{', 20 | PIPE: '|', 21 | BRACE_R: '}', 22 | NAME: 'Name', 23 | INT: 'Int', 24 | FLOAT: 'Float', 25 | STRING: 'String', 26 | BLOCK_STRING: 'BlockString', 27 | COMMENT: 'Comment' 28 | }); 29 | /** 30 | * The enum type representing the token kinds values. 31 | */ 32 | -------------------------------------------------------------------------------- /node_modules/graphql/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "graphql", 3 | "version": "15.8.0", 4 | "description": "A Query Language and Runtime which can target any service.", 5 | "license": "MIT", 6 | "main": "index", 7 | "module": "index.mjs", 8 | "types": "index.d.ts", 9 | "sideEffects": false, 10 | "homepage": "https://github.com/graphql/graphql-js", 11 | "bugs": { 12 | "url": "https://github.com/graphql/graphql-js/issues" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/graphql/graphql-js.git" 17 | }, 18 | "keywords": [ 19 | "graphql", 20 | "graphql-js" 21 | ], 22 | "engines": { 23 | "node": ">= 10.x" 24 | }, 25 | "publishConfig": { 26 | "tag": "15.x.x" 27 | } 28 | } -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/find.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | /* eslint-disable no-redeclare */ 9 | // $FlowFixMe[name-already-bound] 10 | var find = Array.prototype.find ? function (list, predicate) { 11 | return Array.prototype.find.call(list, predicate); 12 | } : function (list, predicate) { 13 | for (var _i2 = 0; _i2 < list.length; _i2++) { 14 | var value = list[_i2]; 15 | 16 | if (predicate(value)) { 17 | return value; 18 | } 19 | } 20 | }; 21 | var _default = find; 22 | exports.default = _default; 23 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/find.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | declare function find( 3 | list: $ReadOnlyArray, 4 | predicate: (item: T) => boolean, 5 | ): T | void; 6 | 7 | /* eslint-disable no-redeclare */ 8 | // $FlowFixMe[name-already-bound] 9 | const find = Array.prototype.find 10 | ? function (list, predicate) { 11 | return Array.prototype.find.call(list, predicate); 12 | } 13 | : function (list, predicate) { 14 | for (const value of list) { 15 | if (predicate(value)) { 16 | return value; 17 | } 18 | } 19 | }; 20 | export default find; 21 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/find.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-redeclare */ 2 | // $FlowFixMe[name-already-bound] 3 | var find = Array.prototype.find ? function (list, predicate) { 4 | return Array.prototype.find.call(list, predicate); 5 | } : function (list, predicate) { 6 | for (var _i2 = 0; _i2 < list.length; _i2++) { 7 | var value = list[_i2]; 8 | 9 | if (predicate(value)) { 10 | return value; 11 | } 12 | } 13 | }; 14 | export default find; 15 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isFinite.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | /* eslint-disable no-redeclare */ 9 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 10 | var isFinitePolyfill = Number.isFinite || function (value) { 11 | return typeof value === 'number' && isFinite(value); 12 | }; 13 | 14 | var _default = isFinitePolyfill; 15 | exports.default = _default; 16 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isFinite.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | declare function isFinitePolyfill( 3 | value: mixed, 4 | ): boolean %checks(typeof value === 'number'); 5 | 6 | /* eslint-disable no-redeclare */ 7 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 8 | const isFinitePolyfill = 9 | Number.isFinite || 10 | function (value) { 11 | return typeof value === 'number' && isFinite(value); 12 | }; 13 | export default isFinitePolyfill; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isFinite.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-redeclare */ 2 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 3 | var isFinitePolyfill = Number.isFinite || function (value) { 4 | return typeof value === 'number' && isFinite(value); 5 | }; 6 | 7 | export default isFinitePolyfill; 8 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isInteger.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | /* eslint-disable no-redeclare */ 9 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 10 | var isInteger = Number.isInteger || function (value) { 11 | return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; 12 | }; 13 | 14 | var _default = isInteger; 15 | exports.default = _default; 16 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isInteger.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | declare function isInteger(value: mixed): boolean %checks(typeof value === 3 | 'number'); 4 | 5 | /* eslint-disable no-redeclare */ 6 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 7 | const isInteger = 8 | Number.isInteger || 9 | function (value) { 10 | return ( 11 | typeof value === 'number' && 12 | isFinite(value) && 13 | Math.floor(value) === value 14 | ); 15 | }; 16 | export default isInteger; 17 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/isInteger.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-redeclare */ 2 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 3 | var isInteger = Number.isInteger || function (value) { 4 | return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; 5 | }; 6 | 7 | export default isInteger; 8 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectEntries.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | /* eslint-disable no-redeclare */ 9 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 10 | var objectEntries = Object.entries || function (obj) { 11 | return Object.keys(obj).map(function (key) { 12 | return [key, obj[key]]; 13 | }); 14 | }; 15 | 16 | var _default = objectEntries; 17 | exports.default = _default; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectEntries.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { ObjMap } from '../jsutils/ObjMap'; 3 | 4 | declare function objectEntries(obj: ObjMap): Array<[string, T]>; 5 | 6 | /* eslint-disable no-redeclare */ 7 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 8 | const objectEntries = 9 | Object.entries || ((obj) => Object.keys(obj).map((key) => [key, obj[key]])); 10 | 11 | export default objectEntries; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectEntries.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-redeclare */ 2 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 3 | var objectEntries = Object.entries || function (obj) { 4 | return Object.keys(obj).map(function (key) { 5 | return [key, obj[key]]; 6 | }); 7 | }; 8 | 9 | export default objectEntries; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectValues.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | /* eslint-disable no-redeclare */ 9 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 10 | var objectValues = Object.values || function (obj) { 11 | return Object.keys(obj).map(function (key) { 12 | return obj[key]; 13 | }); 14 | }; 15 | 16 | var _default = objectValues; 17 | exports.default = _default; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectValues.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { ObjMap } from '../jsutils/ObjMap'; 3 | 4 | declare function objectValues(obj: ObjMap): Array; 5 | 6 | /* eslint-disable no-redeclare */ 7 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 8 | const objectValues = 9 | Object.values || ((obj) => Object.keys(obj).map((key) => obj[key])); 10 | export default objectValues; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/objectValues.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-redeclare */ 2 | // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 3 | var objectValues = Object.values || function (obj) { 4 | return Object.keys(obj).map(function (key) { 5 | return obj[key]; 6 | }); 7 | }; 8 | 9 | export default objectValues; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/symbols.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.SYMBOL_TO_STRING_TAG = exports.SYMBOL_ASYNC_ITERATOR = exports.SYMBOL_ITERATOR = void 0; 7 | // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator 8 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 9 | var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator 10 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 11 | 12 | exports.SYMBOL_ITERATOR = SYMBOL_ITERATOR; 13 | var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 14 | 15 | exports.SYMBOL_ASYNC_ITERATOR = SYMBOL_ASYNC_ITERATOR; 16 | var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag'; 17 | exports.SYMBOL_TO_STRING_TAG = SYMBOL_TO_STRING_TAG; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/symbols.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator 3 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 4 | export const SYMBOL_ITERATOR: string = 5 | typeof Symbol === 'function' && Symbol.iterator != null 6 | ? Symbol.iterator 7 | : '@@iterator'; 8 | 9 | // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator 10 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 11 | export const SYMBOL_ASYNC_ITERATOR: string = 12 | typeof Symbol === 'function' && Symbol.asyncIterator != null 13 | ? Symbol.asyncIterator 14 | : '@@asyncIterator'; 15 | 16 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 17 | export const SYMBOL_TO_STRING_TAG: string = 18 | typeof Symbol === 'function' && Symbol.toStringTag != null 19 | ? Symbol.toStringTag 20 | : '@@toStringTag'; 21 | -------------------------------------------------------------------------------- /node_modules/graphql/polyfills/symbols.mjs: -------------------------------------------------------------------------------- 1 | // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator 2 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 3 | export var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator 4 | // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 5 | 6 | export var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') 7 | 8 | export var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/subscription/index.d.ts: -------------------------------------------------------------------------------- 1 | export { 2 | subscribe, 3 | createSourceEventStream, 4 | SubscriptionArgs, 5 | } from './subscribe'; 6 | -------------------------------------------------------------------------------- /node_modules/graphql/subscription/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "subscribe", { 7 | enumerable: true, 8 | get: function get() { 9 | return _subscribe.subscribe; 10 | } 11 | }); 12 | Object.defineProperty(exports, "createSourceEventStream", { 13 | enumerable: true, 14 | get: function get() { 15 | return _subscribe.createSourceEventStream; 16 | } 17 | }); 18 | 19 | var _subscribe = require("./subscribe.js"); 20 | -------------------------------------------------------------------------------- /node_modules/graphql/subscription/index.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | export { subscribe, createSourceEventStream } from './subscribe'; 3 | export type { SubscriptionArgs } from './subscribe'; 4 | -------------------------------------------------------------------------------- /node_modules/graphql/subscription/index.mjs: -------------------------------------------------------------------------------- 1 | export { subscribe, createSourceEventStream } from "./subscribe.mjs"; 2 | -------------------------------------------------------------------------------- /node_modules/graphql/subscription/mapAsyncIterator.d.ts: -------------------------------------------------------------------------------- 1 | import { PromiseOrValue } from '../jsutils/PromiseOrValue'; 2 | 3 | /** 4 | * Given an AsyncIterable and a callback function, return an AsyncIterator 5 | * which produces values mapped via calling the callback function. 6 | */ 7 | export default function mapAsyncIterator( 8 | iterable: AsyncIterable, 9 | callback: (arg: T) => PromiseOrValue, 10 | rejectCallback?: (arg: any) => PromiseOrValue, 11 | ): any; // TS_SPECIFIC: AsyncGenerator requires typescript@3.6 12 | -------------------------------------------------------------------------------- /node_modules/graphql/type/introspection.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | GraphQLObjectType, 3 | GraphQLField, 4 | GraphQLEnumType, 5 | GraphQLNamedType, 6 | } from './definition'; 7 | 8 | export const __Schema: GraphQLObjectType; 9 | export const __Directive: GraphQLObjectType; 10 | export const __DirectiveLocation: GraphQLEnumType; 11 | export const __Type: GraphQLObjectType; 12 | export const __Field: GraphQLObjectType; 13 | export const __InputValue: GraphQLObjectType; 14 | export const __EnumValue: GraphQLObjectType; 15 | 16 | export const TypeKind: { 17 | SCALAR: 'SCALAR'; 18 | OBJECT: 'OBJECT'; 19 | INTERFACE: 'INTERFACE'; 20 | UNION: 'UNION'; 21 | ENUM: 'ENUM'; 22 | INPUT_OBJECT: 'INPUT_OBJECT'; 23 | LIST: 'LIST'; 24 | NON_NULL: 'NON_NULL'; 25 | }; 26 | 27 | export const __TypeKind: GraphQLEnumType; 28 | 29 | /** 30 | * Note that these are GraphQLField and not GraphQLFieldConfig, 31 | * so the format for args is different. 32 | */ 33 | 34 | export const SchemaMetaFieldDef: GraphQLField; 35 | export const TypeMetaFieldDef: GraphQLField; 36 | export const TypeNameMetaFieldDef: GraphQLField; 37 | 38 | export const introspectionTypes: ReadonlyArray; 39 | 40 | export function isIntrospectionType(type: GraphQLNamedType): boolean; 41 | -------------------------------------------------------------------------------- /node_modules/graphql/type/scalars.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLScalarType, GraphQLNamedType } from './definition'; 2 | 3 | export const GraphQLInt: GraphQLScalarType; 4 | export const GraphQLFloat: GraphQLScalarType; 5 | export const GraphQLString: GraphQLScalarType; 6 | export const GraphQLBoolean: GraphQLScalarType; 7 | export const GraphQLID: GraphQLScalarType; 8 | 9 | export const specifiedScalarTypes: ReadonlyArray; 10 | 11 | export function isSpecifiedScalarType(type: GraphQLNamedType): boolean; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/type/validate.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from '../error/GraphQLError'; 2 | 3 | import { GraphQLSchema } from './schema'; 4 | 5 | /** 6 | * Implements the "Type Validation" sub-sections of the specification's 7 | * "Type System" section. 8 | * 9 | * Validation runs synchronously, returning an array of encountered errors, or 10 | * an empty array if no errors were encountered and the Schema is valid. 11 | */ 12 | export function validateSchema( 13 | schema: GraphQLSchema, 14 | ): ReadonlyArray; 15 | 16 | /** 17 | * Utility function which asserts a schema is valid by throwing an error if 18 | * it is invalid. 19 | */ 20 | export function assertValidSchema(schema: GraphQLSchema): void; 21 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/assertValidName.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from '../error/GraphQLError'; 2 | 3 | /** 4 | * Upholds the spec rules about naming. 5 | */ 6 | export function assertValidName(name: string): string; 7 | 8 | /** 9 | * Returns an Error if a name is invalid. 10 | */ 11 | export function isValidNameError(name: string): GraphQLError | undefined; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/assertValidName.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import devAssert from '../jsutils/devAssert'; 3 | 4 | import { GraphQLError } from '../error/GraphQLError'; 5 | 6 | const NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/; 7 | 8 | /** 9 | * Upholds the spec rules about naming. 10 | */ 11 | export function assertValidName(name: string): string { 12 | const error = isValidNameError(name); 13 | if (error) { 14 | throw error; 15 | } 16 | return name; 17 | } 18 | 19 | /** 20 | * Returns an Error if a name is invalid. 21 | */ 22 | export function isValidNameError(name: string): GraphQLError | void { 23 | devAssert(typeof name === 'string', 'Expected name to be a string.'); 24 | if (name.length > 1 && name[0] === '_' && name[1] === '_') { 25 | return new GraphQLError( 26 | `Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`, 27 | ); 28 | } 29 | if (!NAME_RX.test(name)) { 30 | return new GraphQLError( 31 | `Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "${name}" does not.`, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/assertValidName.mjs: -------------------------------------------------------------------------------- 1 | import devAssert from "../jsutils/devAssert.mjs"; 2 | import { GraphQLError } from "../error/GraphQLError.mjs"; 3 | var NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/; 4 | /** 5 | * Upholds the spec rules about naming. 6 | */ 7 | 8 | export function assertValidName(name) { 9 | var error = isValidNameError(name); 10 | 11 | if (error) { 12 | throw error; 13 | } 14 | 15 | return name; 16 | } 17 | /** 18 | * Returns an Error if a name is invalid. 19 | */ 20 | 21 | export function isValidNameError(name) { 22 | typeof name === 'string' || devAssert(0, 'Expected name to be a string.'); 23 | 24 | if (name.length > 1 && name[0] === '_' && name[1] === '_') { 25 | return new GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection.")); 26 | } 27 | 28 | if (!NAME_RX.test(name)) { 29 | return new GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not.")); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/astFromValue.d.ts: -------------------------------------------------------------------------------- 1 | import { Maybe } from '../jsutils/Maybe'; 2 | 3 | import { ValueNode } from '../language/ast'; 4 | import { GraphQLInputType } from '../type/definition'; 5 | 6 | /** 7 | * Produces a GraphQL Value AST given a JavaScript value. 8 | * 9 | * A GraphQL type must be provided, which will be used to interpret different 10 | * JavaScript values. 11 | * 12 | * | JSON Value | GraphQL Value | 13 | * | ------------- | -------------------- | 14 | * | Object | Input Object | 15 | * | Array | List | 16 | * | Boolean | Boolean | 17 | * | String | String / Enum Value | 18 | * | Number | Int / Float | 19 | * | Mixed | Enum Value | 20 | * | null | NullValue | 21 | * 22 | */ 23 | export function astFromValue( 24 | value: any, 25 | type: GraphQLInputType, 26 | ): Maybe; 27 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/buildClientSchema.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLSchema, GraphQLSchemaValidationOptions } from '../type/schema'; 2 | 3 | import { IntrospectionQuery } from './getIntrospectionQuery'; 4 | 5 | /** 6 | * Build a GraphQLSchema for use by client tools. 7 | * 8 | * Given the result of a client running the introspection query, creates and 9 | * returns a GraphQLSchema instance which can be then used with all graphql-js 10 | * tools, but cannot be used to execute a query, as introspection does not 11 | * represent the "resolver", "parse" or "serialize" functions or any other 12 | * server-internal mechanisms. 13 | * 14 | * This function expects a complete introspection result. Don't forget to check 15 | * the "errors" field of a server response before calling this function. 16 | */ 17 | export function buildClientSchema( 18 | introspection: IntrospectionQuery, 19 | options?: GraphQLSchemaValidationOptions, 20 | ): GraphQLSchema; 21 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/coerceInputValue.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLInputType } from '../type/definition'; 2 | import { GraphQLError } from '../error/GraphQLError'; 3 | 4 | type OnErrorCB = ( 5 | path: ReadonlyArray, 6 | invalidValue: any, 7 | error: GraphQLError, 8 | ) => void; 9 | 10 | /** 11 | * Coerces a JavaScript value given a GraphQL Input Type. 12 | */ 13 | export function coerceInputValue( 14 | inputValue: any, 15 | type: GraphQLInputType, 16 | onError?: OnErrorCB, 17 | ): any; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/concatAST.d.ts: -------------------------------------------------------------------------------- 1 | import { DocumentNode } from '../language/ast'; 2 | 3 | /** 4 | * Provided a collection of ASTs, presumably each from different files, 5 | * concatenate the ASTs together into batched AST, useful for validating many 6 | * GraphQL source files which together represent one conceptual application. 7 | */ 8 | export function concatAST(asts: ReadonlyArray): DocumentNode; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/concatAST.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.concatAST = concatAST; 7 | 8 | /** 9 | * Provided a collection of ASTs, presumably each from different files, 10 | * concatenate the ASTs together into batched AST, useful for validating many 11 | * GraphQL source files which together represent one conceptual application. 12 | */ 13 | function concatAST(documents) { 14 | var definitions = []; 15 | 16 | for (var _i2 = 0; _i2 < documents.length; _i2++) { 17 | var doc = documents[_i2]; 18 | definitions = definitions.concat(doc.definitions); 19 | } 20 | 21 | return { 22 | kind: 'Document', 23 | definitions: definitions 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/concatAST.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { DocumentNode } from '../language/ast'; 3 | 4 | /** 5 | * Provided a collection of ASTs, presumably each from different files, 6 | * concatenate the ASTs together into batched AST, useful for validating many 7 | * GraphQL source files which together represent one conceptual application. 8 | */ 9 | export function concatAST( 10 | documents: $ReadOnlyArray, 11 | ): DocumentNode { 12 | let definitions = []; 13 | for (const doc of documents) { 14 | definitions = definitions.concat(doc.definitions); 15 | } 16 | return { kind: 'Document', definitions }; 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/concatAST.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Provided a collection of ASTs, presumably each from different files, 3 | * concatenate the ASTs together into batched AST, useful for validating many 4 | * GraphQL source files which together represent one conceptual application. 5 | */ 6 | export function concatAST(documents) { 7 | var definitions = []; 8 | 9 | for (var _i2 = 0; _i2 < documents.length; _i2++) { 10 | var doc = documents[_i2]; 11 | definitions = definitions.concat(doc.definitions); 12 | } 13 | 14 | return { 15 | kind: 'Document', 16 | definitions: definitions 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/findDeprecatedUsages.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from '../error/GraphQLError'; 2 | import { DocumentNode } from '../language/ast'; 3 | import { GraphQLSchema } from '../type/schema'; 4 | 5 | /** 6 | * A validation rule which reports deprecated usages. 7 | * 8 | * Returns a list of GraphQLError instances describing each deprecated use. 9 | * 10 | * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead: 11 | * 12 | * ``` 13 | * import { validate, NoDeprecatedCustomRule } from 'graphql' 14 | * 15 | * const errors = validate(schema, document, [NoDeprecatedCustomRule]) 16 | * ``` 17 | */ 18 | export function findDeprecatedUsages( 19 | schema: GraphQLSchema, 20 | ast: DocumentNode, 21 | ): ReadonlyArray; 22 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/findDeprecatedUsages.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.findDeprecatedUsages = findDeprecatedUsages; 7 | 8 | var _validate = require("../validation/validate.js"); 9 | 10 | var _NoDeprecatedCustomRule = require("../validation/rules/custom/NoDeprecatedCustomRule.js"); 11 | 12 | /** 13 | * A validation rule which reports deprecated usages. 14 | * 15 | * Returns a list of GraphQLError instances describing each deprecated use. 16 | * 17 | * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead: 18 | * 19 | * ``` 20 | * import { validate, NoDeprecatedCustomRule } from 'graphql' 21 | * 22 | * const errors = validate(schema, document, [NoDeprecatedCustomRule]) 23 | * ``` 24 | */ 25 | function findDeprecatedUsages(schema, ast) { 26 | return (0, _validate.validate)(schema, ast, [_NoDeprecatedCustomRule.NoDeprecatedCustomRule]); 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/findDeprecatedUsages.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { GraphQLError } from '../error/GraphQLError'; 3 | 4 | import type { DocumentNode } from '../language/ast'; 5 | 6 | import type { GraphQLSchema } from '../type/schema'; 7 | 8 | import { validate } from '../validation/validate'; 9 | import { NoDeprecatedCustomRule } from '../validation/rules/custom/NoDeprecatedCustomRule'; 10 | 11 | /** 12 | * A validation rule which reports deprecated usages. 13 | * 14 | * Returns a list of GraphQLError instances describing each deprecated use. 15 | * 16 | * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead: 17 | * 18 | * ``` 19 | * import { validate, NoDeprecatedCustomRule } from 'graphql' 20 | * 21 | * const errors = validate(schema, document, [NoDeprecatedCustomRule]) 22 | * ``` 23 | */ 24 | export function findDeprecatedUsages( 25 | schema: GraphQLSchema, 26 | ast: DocumentNode, 27 | ): $ReadOnlyArray { 28 | return validate(schema, ast, [NoDeprecatedCustomRule]); 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/findDeprecatedUsages.mjs: -------------------------------------------------------------------------------- 1 | import { validate } from "../validation/validate.mjs"; 2 | import { NoDeprecatedCustomRule } from "../validation/rules/custom/NoDeprecatedCustomRule.mjs"; 3 | /** 4 | * A validation rule which reports deprecated usages. 5 | * 6 | * Returns a list of GraphQLError instances describing each deprecated use. 7 | * 8 | * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead: 9 | * 10 | * ``` 11 | * import { validate, NoDeprecatedCustomRule } from 'graphql' 12 | * 13 | * const errors = validate(schema, document, [NoDeprecatedCustomRule]) 14 | * ``` 15 | */ 16 | 17 | export function findDeprecatedUsages(schema, ast) { 18 | return validate(schema, ast, [NoDeprecatedCustomRule]); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/getOperationAST.d.ts: -------------------------------------------------------------------------------- 1 | import { Maybe } from '../jsutils/Maybe'; 2 | 3 | import { DocumentNode, OperationDefinitionNode } from '../language/ast'; 4 | 5 | /** 6 | * Returns an operation AST given a document AST and optionally an operation 7 | * name. If a name is not provided, an operation is only returned if only one is 8 | * provided in the document. 9 | */ 10 | export function getOperationAST( 11 | documentAST: DocumentNode, 12 | operationName?: Maybe, 13 | ): Maybe; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/getOperationAST.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import type { DocumentNode, OperationDefinitionNode } from '../language/ast'; 3 | import { Kind } from '../language/kinds'; 4 | 5 | /** 6 | * Returns an operation AST given a document AST and optionally an operation 7 | * name. If a name is not provided, an operation is only returned if only one is 8 | * provided in the document. 9 | */ 10 | export function getOperationAST( 11 | documentAST: DocumentNode, 12 | operationName?: ?string, 13 | ): ?OperationDefinitionNode { 14 | let operation = null; 15 | for (const definition of documentAST.definitions) { 16 | if (definition.kind === Kind.OPERATION_DEFINITION) { 17 | if (operationName == null) { 18 | // If no operation name was provided, only return an Operation if there 19 | // is one defined in the document. Upon encountering the second, return 20 | // null. 21 | if (operation) { 22 | return null; 23 | } 24 | operation = definition; 25 | } else if (definition.name?.value === operationName) { 26 | return definition; 27 | } 28 | } 29 | } 30 | return operation; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/getOperationAST.mjs: -------------------------------------------------------------------------------- 1 | import { Kind } from "../language/kinds.mjs"; 2 | /** 3 | * Returns an operation AST given a document AST and optionally an operation 4 | * name. If a name is not provided, an operation is only returned if only one is 5 | * provided in the document. 6 | */ 7 | 8 | export function getOperationAST(documentAST, operationName) { 9 | var operation = null; 10 | 11 | for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) { 12 | var definition = _documentAST$definiti2[_i2]; 13 | 14 | if (definition.kind === Kind.OPERATION_DEFINITION) { 15 | var _definition$name; 16 | 17 | if (operationName == null) { 18 | // If no operation name was provided, only return an Operation if there 19 | // is one defined in the document. Upon encountering the second, return 20 | // null. 21 | if (operation) { 22 | return null; 23 | } 24 | 25 | operation = definition; 26 | } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) { 27 | return definition; 28 | } 29 | } 30 | } 31 | 32 | return operation; 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/getOperationRootType.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | OperationDefinitionNode, 3 | OperationTypeDefinitionNode, 4 | } from '../language/ast'; 5 | import { GraphQLSchema } from '../type/schema'; 6 | import { GraphQLObjectType } from '../type/definition'; 7 | 8 | /** 9 | * Extracts the root type of the operation from the schema. 10 | */ 11 | export function getOperationRootType( 12 | schema: GraphQLSchema, 13 | operation: OperationDefinitionNode | OperationTypeDefinitionNode, 14 | ): GraphQLObjectType; 15 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/getOperationRootType.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Extracts the root type of the operation from the schema. 5 | */ 6 | export function getOperationRootType(schema, operation) { 7 | if (operation.operation === 'query') { 8 | var queryType = schema.getQueryType(); 9 | 10 | if (!queryType) { 11 | throw new GraphQLError('Schema does not define the required query root type.', operation); 12 | } 13 | 14 | return queryType; 15 | } 16 | 17 | if (operation.operation === 'mutation') { 18 | var mutationType = schema.getMutationType(); 19 | 20 | if (!mutationType) { 21 | throw new GraphQLError('Schema is not configured for mutations.', operation); 22 | } 23 | 24 | return mutationType; 25 | } 26 | 27 | if (operation.operation === 'subscription') { 28 | var subscriptionType = schema.getSubscriptionType(); 29 | 30 | if (!subscriptionType) { 31 | throw new GraphQLError('Schema is not configured for subscriptions.', operation); 32 | } 33 | 34 | return subscriptionType; 35 | } 36 | 37 | throw new GraphQLError('Can only have query, mutation and subscription operations.', operation); 38 | } 39 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/introspectionFromSchema.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLSchema } from '../type/schema'; 2 | 3 | import { 4 | IntrospectionQuery, 5 | IntrospectionOptions, 6 | } from './getIntrospectionQuery'; 7 | 8 | /** 9 | * Build an IntrospectionQuery from a GraphQLSchema 10 | * 11 | * IntrospectionQuery is useful for utilities that care about type and field 12 | * relationships, but do not need to traverse through those relationships. 13 | * 14 | * This is the inverse of buildClientSchema. The primary use case is outside 15 | * of the server context, for instance when doing schema comparisons. 16 | */ 17 | export function introspectionFromSchema( 18 | schema: GraphQLSchema, 19 | options?: IntrospectionOptions, 20 | ): IntrospectionQuery; 21 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/lexicographicSortSchema.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLSchema } from '../type/schema'; 2 | 3 | /** 4 | * Sort GraphQLSchema. 5 | * 6 | * This function returns a sorted copy of the given GraphQLSchema. 7 | */ 8 | export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/printSchema.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLSchema } from '../type/schema'; 2 | import { GraphQLNamedType } from '../type/definition'; 3 | 4 | export interface Options { 5 | /** 6 | * Descriptions are defined as preceding string literals, however an older 7 | * experimental version of the SDL supported preceding comments as 8 | * descriptions. Set to true to enable this deprecated behavior. 9 | * This option is provided to ease adoption and will be removed in v16. 10 | * 11 | * Default: false 12 | */ 13 | commentDescriptions?: boolean; 14 | } 15 | 16 | /** 17 | * Accepts options as a second argument: 18 | * 19 | * - commentDescriptions: 20 | * Provide true to use preceding comments as the description. 21 | * 22 | */ 23 | export function printSchema(schema: GraphQLSchema, options?: Options): string; 24 | 25 | export function printIntrospectionSchema( 26 | schema: GraphQLSchema, 27 | options?: Options, 28 | ): string; 29 | 30 | export function printType(type: GraphQLNamedType, options?: Options): string; 31 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/separateOperations.d.ts: -------------------------------------------------------------------------------- 1 | import { DocumentNode } from '../language/ast'; 2 | 3 | /** 4 | * separateOperations accepts a single AST document which may contain many 5 | * operations and fragments and returns a collection of AST documents each of 6 | * which contains a single operation as well the fragment definitions it 7 | * refers to. 8 | */ 9 | export function separateOperations( 10 | documentAST: DocumentNode, 11 | ): { [key: string]: DocumentNode }; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/typeComparators.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLSchema } from '../type/schema'; 2 | import { GraphQLType, GraphQLCompositeType } from '../type/definition'; 3 | 4 | /** 5 | * Provided two types, return true if the types are equal (invariant). 6 | */ 7 | export function isEqualType(typeA: GraphQLType, typeB: GraphQLType): boolean; 8 | 9 | /** 10 | * Provided a type and a super type, return true if the first type is either 11 | * equal or a subset of the second super type (covariant). 12 | */ 13 | export function isTypeSubTypeOf( 14 | schema: GraphQLSchema, 15 | maybeSubType: GraphQLType, 16 | superType: GraphQLType, 17 | ): boolean; 18 | 19 | /** 20 | * Provided two composite types, determine if they "overlap". Two composite 21 | * types overlap when the Sets of possible concrete types for each intersect. 22 | * 23 | * This is often used to determine if a fragment of a given type could possibly 24 | * be visited in a context of another type. 25 | * 26 | * This function is commutative. 27 | */ 28 | export function doTypesOverlap( 29 | schema: GraphQLSchema, 30 | typeA: GraphQLCompositeType, 31 | typeB: GraphQLCompositeType, 32 | ): boolean; 33 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/typeFromAST.d.ts: -------------------------------------------------------------------------------- 1 | import { NamedTypeNode, ListTypeNode, NonNullTypeNode } from '../language/ast'; 2 | import { GraphQLSchema } from '../type/schema'; 3 | import { 4 | GraphQLNamedType, 5 | GraphQLList, 6 | GraphQLNonNull, 7 | } from '../type/definition'; 8 | 9 | /** 10 | * Given a Schema and an AST node describing a type, return a GraphQLType 11 | * definition which applies to that type. For example, if provided the parsed 12 | * AST node for `[User]`, a GraphQLList instance will be returned, containing 13 | * the type called "User" found in the schema. If a type called "User" is not 14 | * found in the schema, then undefined will be returned. 15 | */ 16 | export function typeFromAST( 17 | schema: GraphQLSchema, 18 | typeNode: NamedTypeNode, 19 | ): GraphQLNamedType | undefined; 20 | 21 | export function typeFromAST( 22 | schema: GraphQLSchema, 23 | typeNode: ListTypeNode, 24 | ): GraphQLList | undefined; 25 | 26 | export function typeFromAST( 27 | schema: GraphQLSchema, 28 | typeNode: NonNullTypeNode, 29 | ): GraphQLNonNull | undefined; 30 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/typedQueryDocumentNode.d.ts: -------------------------------------------------------------------------------- 1 | import { DocumentNode, ExecutableDefinitionNode } from '../language/ast'; 2 | 3 | /** 4 | * Wrapper type that contains DocumentNode and types that can be deduced from it. 5 | */ 6 | export interface TypedQueryDocumentNode< 7 | TResponseData = Record, 8 | TRequestVariables = Record 9 | > extends DocumentNode { 10 | readonly definitions: ReadonlyArray; 11 | // FIXME: remove once TS implements proper way to enforce nominal typing 12 | /** 13 | * This type is used to ensure that the variables you pass in to the query are assignable to Variables 14 | * and that the Result is assignable to whatever you pass your result to. The method is never actually 15 | * implemented, but the type is valid because we list it as optional 16 | */ 17 | __ensureTypesOfVariablesAndResultMatching?: ( 18 | variables: TRequestVariables, 19 | ) => TResponseData; 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/valueFromAST.d.ts: -------------------------------------------------------------------------------- 1 | import { Maybe } from '../jsutils/Maybe'; 2 | 3 | import { ValueNode } from '../language/ast'; 4 | import { GraphQLInputType } from '../type/definition'; 5 | 6 | /** 7 | * Produces a JavaScript value given a GraphQL Value AST. 8 | * 9 | * A GraphQL type must be provided, which will be used to interpret different 10 | * GraphQL Value literals. 11 | * 12 | * Returns `undefined` when the value could not be validly coerced according to 13 | * the provided type. 14 | * 15 | * | GraphQL Value | JSON Value | 16 | * | -------------------- | ------------- | 17 | * | Input Object | Object | 18 | * | List | Array | 19 | * | Boolean | Boolean | 20 | * | String | String | 21 | * | Int / Float | Number | 22 | * | Enum Value | Mixed | 23 | * | NullValue | null | 24 | * 25 | */ 26 | export function valueFromAST( 27 | valueNode: Maybe, 28 | type: GraphQLInputType, 29 | variables?: Maybe<{ [key: string]: any }>, 30 | ): any; 31 | -------------------------------------------------------------------------------- /node_modules/graphql/utilities/valueFromASTUntyped.d.ts: -------------------------------------------------------------------------------- 1 | import { Maybe } from '../jsutils/Maybe'; 2 | 3 | import { ValueNode } from '../language/ast'; 4 | 5 | /** 6 | * Produces a JavaScript value given a GraphQL Value AST. 7 | * 8 | * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value 9 | * will reflect the provided GraphQL value AST. 10 | * 11 | * | GraphQL Value | JavaScript Value | 12 | * | -------------------- | ---------------- | 13 | * | Input Object | Object | 14 | * | List | Array | 15 | * | Boolean | Boolean | 16 | * | String / Enum | String | 17 | * | Int / Float | Number | 18 | * | Null | null | 19 | * 20 | */ 21 | export function valueFromASTUntyped( 22 | valueNode: ValueNode, 23 | variables?: Maybe<{ [key: string]: any }>, 24 | ): any; 25 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitions.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { ExecutableDefinitionsRule } from 'graphql' 5 | * or 6 | * import { ExecutableDefinitionsRule } from 'graphql/validation' 7 | */ 8 | export { ExecutableDefinitionsRule as ExecutableDefinitions } from './ExecutableDefinitionsRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "ExecutableDefinitions", { 7 | enumerable: true, 8 | get: function get() { 9 | return _ExecutableDefinitionsRule.ExecutableDefinitionsRule; 10 | } 11 | }); 12 | 13 | var _ExecutableDefinitionsRule = require("./ExecutableDefinitionsRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitions.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { ExecutableDefinitionsRule } from 'graphql' 6 | * or 7 | * import { ExecutableDefinitionsRule } from 'graphql/validation' 8 | */ 9 | export { ExecutableDefinitionsRule as ExecutableDefinitions } from './ExecutableDefinitionsRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitions.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { ExecutableDefinitionsRule } from 'graphql' 5 | * or 6 | * import { ExecutableDefinitionsRule } from 'graphql/validation' 7 | */ 8 | export { ExecutableDefinitionsRule as ExecutableDefinitions } from "./ExecutableDefinitionsRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitionsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Executable definitions 6 | * 7 | * A GraphQL document is only valid for execution if all definitions are either 8 | * operation or fragment definitions. 9 | */ 10 | export function ExecutableDefinitionsRule( 11 | context: ASTValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | import { Kind } from "../../language/kinds.mjs"; 3 | import { isExecutableDefinitionNode } from "../../language/predicates.mjs"; 4 | 5 | /** 6 | * Executable definitions 7 | * 8 | * A GraphQL document is only valid for execution if all definitions are either 9 | * operation or fragment definitions. 10 | */ 11 | export function ExecutableDefinitionsRule(context) { 12 | return { 13 | Document: function Document(node) { 14 | for (var _i2 = 0, _node$definitions2 = node.definitions; _i2 < _node$definitions2.length; _i2++) { 15 | var definition = _node$definitions2[_i2]; 16 | 17 | if (!isExecutableDefinitionNode(definition)) { 18 | var defName = definition.kind === Kind.SCHEMA_DEFINITION || definition.kind === Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"'; 19 | context.reportError(new GraphQLError("The ".concat(defName, " definition is not executable."), definition)); 20 | } 21 | } 22 | 23 | return false; 24 | } 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Fields on correct type 6 | * 7 | * A GraphQL document is only valid if all fields selected are defined by the 8 | * parent type, or are an allowed meta field such as __typename. 9 | */ 10 | export function FieldsOnCorrectTypeRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Fragments on composite type 6 | * 7 | * Fragments use a type condition to determine if they apply, since fragments 8 | * can only be spread into a composite type (object, interface, or union), the 9 | * type condition must also be a composite type. 10 | */ 11 | export function FragmentsOnCompositeTypesRule( 12 | context: ValidationContext, 13 | ): ASTVisitor; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownArgumentNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ValidationContext, SDLValidationContext } from '../ValidationContext'; 2 | import { ASTVisitor } from '../../language/visitor'; 3 | 4 | /** 5 | * Known argument names 6 | * 7 | * A GraphQL field is only valid if all supplied arguments are defined by 8 | * that field. 9 | */ 10 | export function KnownArgumentNamesRule(context: ValidationContext): ASTVisitor; 11 | 12 | /** 13 | * @internal 14 | */ 15 | export function KnownArgumentNamesOnDirectivesRule( 16 | context: ValidationContext | SDLValidationContext, 17 | ): ASTVisitor; 18 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownDirectivesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext, SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Known directives 6 | * 7 | * A GraphQL document is only valid if all `@directives` are known by the 8 | * schema and legally positioned. 9 | */ 10 | export function KnownDirectivesRule( 11 | context: ValidationContext | SDLValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownFragmentNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Known fragment names 6 | * 7 | * A GraphQL document is only valid if all `...Fragment` fragment spreads refer 8 | * to fragments defined in the same document. 9 | */ 10 | export function KnownFragmentNamesRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownFragmentNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.KnownFragmentNamesRule = KnownFragmentNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Known fragment names 12 | * 13 | * A GraphQL document is only valid if all `...Fragment` fragment spreads refer 14 | * to fragments defined in the same document. 15 | */ 16 | function KnownFragmentNamesRule(context) { 17 | return { 18 | FragmentSpread: function FragmentSpread(node) { 19 | var fragmentName = node.name.value; 20 | var fragment = context.getFragment(fragmentName); 21 | 22 | if (!fragment) { 23 | context.reportError(new _GraphQLError.GraphQLError("Unknown fragment \"".concat(fragmentName, "\"."), node.name)); 24 | } 25 | } 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | 6 | import type { ValidationContext } from '../ValidationContext'; 7 | 8 | /** 9 | * Known fragment names 10 | * 11 | * A GraphQL document is only valid if all `...Fragment` fragment spreads refer 12 | * to fragments defined in the same document. 13 | */ 14 | export function KnownFragmentNamesRule(context: ValidationContext): ASTVisitor { 15 | return { 16 | FragmentSpread(node) { 17 | const fragmentName = node.name.value; 18 | const fragment = context.getFragment(fragmentName); 19 | if (!fragment) { 20 | context.reportError( 21 | new GraphQLError(`Unknown fragment "${fragmentName}".`, node.name), 22 | ); 23 | } 24 | }, 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Known fragment names 5 | * 6 | * A GraphQL document is only valid if all `...Fragment` fragment spreads refer 7 | * to fragments defined in the same document. 8 | */ 9 | export function KnownFragmentNamesRule(context) { 10 | return { 11 | FragmentSpread: function FragmentSpread(node) { 12 | var fragmentName = node.name.value; 13 | var fragment = context.getFragment(fragmentName); 14 | 15 | if (!fragment) { 16 | context.reportError(new GraphQLError("Unknown fragment \"".concat(fragmentName, "\"."), node.name)); 17 | } 18 | } 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/KnownTypeNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext, SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Known type names 6 | * 7 | * A GraphQL document is only valid if referenced types (specifically 8 | * variable definitions and fragment conditions) are defined by the type schema. 9 | */ 10 | export function KnownTypeNamesRule( 11 | context: ValidationContext | SDLValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneAnonymousOperationRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Lone anonymous operation 6 | * 7 | * A GraphQL document is only valid if when it contains an anonymous operation 8 | * (the query short-hand) that it contains only that one operation definition. 9 | */ 10 | export function LoneAnonymousOperationRule( 11 | context: ASTValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | var _kinds = require("../../language/kinds.js"); 11 | 12 | /** 13 | * Lone anonymous operation 14 | * 15 | * A GraphQL document is only valid if when it contains an anonymous operation 16 | * (the query short-hand) that it contains only that one operation definition. 17 | */ 18 | function LoneAnonymousOperationRule(context) { 19 | var operationCount = 0; 20 | return { 21 | Document: function Document(node) { 22 | operationCount = node.definitions.filter(function (definition) { 23 | return definition.kind === _kinds.Kind.OPERATION_DEFINITION; 24 | }).length; 25 | }, 26 | OperationDefinition: function OperationDefinition(node) { 27 | if (!node.name && operationCount > 1) { 28 | context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', node)); 29 | } 30 | } 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | import { Kind } from '../../language/kinds'; 6 | 7 | import type { ASTValidationContext } from '../ValidationContext'; 8 | 9 | /** 10 | * Lone anonymous operation 11 | * 12 | * A GraphQL document is only valid if when it contains an anonymous operation 13 | * (the query short-hand) that it contains only that one operation definition. 14 | */ 15 | export function LoneAnonymousOperationRule( 16 | context: ASTValidationContext, 17 | ): ASTVisitor { 18 | let operationCount = 0; 19 | return { 20 | Document(node) { 21 | operationCount = node.definitions.filter( 22 | (definition) => definition.kind === Kind.OPERATION_DEFINITION, 23 | ).length; 24 | }, 25 | OperationDefinition(node) { 26 | if (!node.name && operationCount > 1) { 27 | context.reportError( 28 | new GraphQLError( 29 | 'This anonymous operation must be the only defined operation.', 30 | node, 31 | ), 32 | ); 33 | } 34 | }, 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | import { Kind } from "../../language/kinds.mjs"; 3 | 4 | /** 5 | * Lone anonymous operation 6 | * 7 | * A GraphQL document is only valid if when it contains an anonymous operation 8 | * (the query short-hand) that it contains only that one operation definition. 9 | */ 10 | export function LoneAnonymousOperationRule(context) { 11 | var operationCount = 0; 12 | return { 13 | Document: function Document(node) { 14 | operationCount = node.definitions.filter(function (definition) { 15 | return definition.kind === Kind.OPERATION_DEFINITION; 16 | }).length; 17 | }, 18 | OperationDefinition: function OperationDefinition(node) { 19 | if (!node.name && operationCount > 1) { 20 | context.reportError(new GraphQLError('This anonymous operation must be the only defined operation.', node)); 21 | } 22 | } 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneSchemaDefinition.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { LoneSchemaDefinitionRule } from 'graphql' 5 | * or 6 | * import { LoneSchemaDefinitionRule } from 'graphql/validation' 7 | */ 8 | export { LoneSchemaDefinitionRule as LoneSchemaDefinition } from './LoneSchemaDefinitionRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneSchemaDefinition.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "LoneSchemaDefinition", { 7 | enumerable: true, 8 | get: function get() { 9 | return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule; 10 | } 11 | }); 12 | 13 | var _LoneSchemaDefinitionRule = require("./LoneSchemaDefinitionRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneSchemaDefinition.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { LoneSchemaDefinitionRule } from 'graphql' 6 | * or 7 | * import { LoneSchemaDefinitionRule } from 'graphql/validation' 8 | */ 9 | export { LoneSchemaDefinitionRule as LoneSchemaDefinition } from './LoneSchemaDefinitionRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneSchemaDefinition.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { LoneSchemaDefinitionRule } from 'graphql' 5 | * or 6 | * import { LoneSchemaDefinitionRule } from 'graphql/validation' 7 | */ 8 | export { LoneSchemaDefinitionRule as LoneSchemaDefinition } from "./LoneSchemaDefinitionRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Lone Schema definition 6 | * 7 | * A GraphQL document is only valid if it contains only one schema definition. 8 | */ 9 | export function LoneSchemaDefinitionRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/NoFragmentCyclesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | export function NoFragmentCyclesRule(context: ValidationContext): ASTVisitor; 5 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/NoUndefinedVariablesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * No undefined variables 6 | * 7 | * A GraphQL operation is only valid if all variables encountered, both directly 8 | * and via fragment spreads, are defined by that operation. 9 | */ 10 | export function NoUndefinedVariablesRule( 11 | context: ValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/NoUnusedFragmentsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * No unused fragments 6 | * 7 | * A GraphQL document is only valid if all fragment definitions are spread 8 | * within operations, or spread within other fragments spread within operations. 9 | */ 10 | export function NoUnusedFragmentsRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/NoUnusedVariablesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * No unused variables 6 | * 7 | * A GraphQL operation is only valid if all variables defined by an operation 8 | * are used, either directly or within a spread fragment. 9 | */ 10 | export function NoUnusedVariablesRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Overlapping fields can be merged 6 | * 7 | * A selection set is only valid if all fields (including spreading any 8 | * fragments) either correspond to distinct response names or can be merged 9 | * without ambiguity. 10 | */ 11 | export function OverlappingFieldsCanBeMergedRule( 12 | context: ValidationContext, 13 | ): ASTVisitor; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Possible fragment spread 6 | * 7 | * A fragment spread is only valid if the type condition could ever possibly 8 | * be true: if there is a non-empty intersection of the possible parent types, 9 | * and possible types which pass the type condition. 10 | */ 11 | export function PossibleFragmentSpreadsRule( 12 | context: ValidationContext, 13 | ): ASTVisitor; 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleTypeExtensions.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { PossibleTypeExtensionsRule } from 'graphql' 5 | * or 6 | * import { PossibleTypeExtensionsRule } from 'graphql/validation' 7 | */ 8 | export { PossibleTypeExtensionsRule as PossibleTypeExtensions } from './PossibleTypeExtensionsRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleTypeExtensions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "PossibleTypeExtensions", { 7 | enumerable: true, 8 | get: function get() { 9 | return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule; 10 | } 11 | }); 12 | 13 | var _PossibleTypeExtensionsRule = require("./PossibleTypeExtensionsRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleTypeExtensions.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { PossibleTypeExtensionsRule } from 'graphql' 6 | * or 7 | * import { PossibleTypeExtensionsRule } from 'graphql/validation' 8 | */ 9 | export { PossibleTypeExtensionsRule as PossibleTypeExtensions } from './PossibleTypeExtensionsRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleTypeExtensions.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { PossibleTypeExtensionsRule } from 'graphql' 5 | * or 6 | * import { PossibleTypeExtensionsRule } from 'graphql/validation' 7 | */ 8 | export { PossibleTypeExtensionsRule as PossibleTypeExtensions } from "./PossibleTypeExtensionsRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Possible type extension 6 | * 7 | * A type extension is only valid if the type is defined and has the same kind. 8 | */ 9 | export function PossibleTypeExtensionsRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext, SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Provided required arguments 6 | * 7 | * A field or directive is only valid if all required (non-null without a 8 | * default value) field arguments have been provided. 9 | */ 10 | export function ProvidedRequiredArgumentsRule( 11 | context: ValidationContext, 12 | ): ASTVisitor; 13 | 14 | /** 15 | * @internal 16 | */ 17 | export function ProvidedRequiredArgumentsOnDirectivesRule( 18 | context: ValidationContext | SDLValidationContext, 19 | ): ASTVisitor; 20 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ScalarLeafsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Scalar leafs 6 | * 7 | * A GraphQL document is valid only if all leaf fields (fields without 8 | * sub selections) are of scalar or enum types. 9 | */ 10 | export function ScalarLeafsRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Subscriptions must only include one field. 6 | * 7 | * A GraphQL subscription is valid only if it contains a single root field. 8 | */ 9 | export function SingleFieldSubscriptionsRule( 10 | context: ASTValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Subscriptions must only include one field. 12 | * 13 | * A GraphQL subscription is valid only if it contains a single root field. 14 | */ 15 | function SingleFieldSubscriptionsRule(context) { 16 | return { 17 | OperationDefinition: function OperationDefinition(node) { 18 | if (node.operation === 'subscription') { 19 | if (node.selectionSet.selections.length !== 1) { 20 | context.reportError(new _GraphQLError.GraphQLError(node.name ? "Subscription \"".concat(node.name.value, "\" must select only one top level field.") : 'Anonymous Subscription must select only one top level field.', node.selectionSet.selections.slice(1))); 21 | } 22 | } 23 | } 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | import type { OperationDefinitionNode } from '../../language/ast'; 6 | 7 | import type { ASTValidationContext } from '../ValidationContext'; 8 | 9 | /** 10 | * Subscriptions must only include one field. 11 | * 12 | * A GraphQL subscription is valid only if it contains a single root field. 13 | */ 14 | export function SingleFieldSubscriptionsRule( 15 | context: ASTValidationContext, 16 | ): ASTVisitor { 17 | return { 18 | OperationDefinition(node: OperationDefinitionNode) { 19 | if (node.operation === 'subscription') { 20 | if (node.selectionSet.selections.length !== 1) { 21 | context.reportError( 22 | new GraphQLError( 23 | node.name 24 | ? `Subscription "${node.name.value}" must select only one top level field.` 25 | : 'Anonymous Subscription must select only one top level field.', 26 | node.selectionSet.selections.slice(1), 27 | ), 28 | ); 29 | } 30 | } 31 | }, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Subscriptions must only include one field. 5 | * 6 | * A GraphQL subscription is valid only if it contains a single root field. 7 | */ 8 | export function SingleFieldSubscriptionsRule(context) { 9 | return { 10 | OperationDefinition: function OperationDefinition(node) { 11 | if (node.operation === 'subscription') { 12 | if (node.selectionSet.selections.length !== 1) { 13 | context.reportError(new GraphQLError(node.name ? "Subscription \"".concat(node.name.value, "\" must select only one top level field.") : 'Anonymous Subscription must select only one top level field.', node.selectionSet.selections.slice(1))); 14 | } 15 | } 16 | } 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueArgumentNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique argument names 6 | * 7 | * A GraphQL field or directive is only valid if all supplied arguments are 8 | * uniquely named. 9 | */ 10 | export function UniqueArgumentNamesRule( 11 | context: ASTValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Unique argument names 12 | * 13 | * A GraphQL field or directive is only valid if all supplied arguments are 14 | * uniquely named. 15 | */ 16 | function UniqueArgumentNamesRule(context) { 17 | var knownArgNames = Object.create(null); 18 | return { 19 | Field: function Field() { 20 | knownArgNames = Object.create(null); 21 | }, 22 | Directive: function Directive() { 23 | knownArgNames = Object.create(null); 24 | }, 25 | Argument: function Argument(node) { 26 | var argName = node.name.value; 27 | 28 | if (knownArgNames[argName]) { 29 | context.reportError(new _GraphQLError.GraphQLError("There can be only one argument named \"".concat(argName, "\"."), [knownArgNames[argName], node.name])); 30 | } else { 31 | knownArgNames[argName] = node.name; 32 | } 33 | 34 | return false; 35 | } 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | import type { ASTVisitor } from '../../language/visitor'; 4 | 5 | import type { ASTValidationContext } from '../ValidationContext'; 6 | 7 | /** 8 | * Unique argument names 9 | * 10 | * A GraphQL field or directive is only valid if all supplied arguments are 11 | * uniquely named. 12 | */ 13 | export function UniqueArgumentNamesRule( 14 | context: ASTValidationContext, 15 | ): ASTVisitor { 16 | let knownArgNames = Object.create(null); 17 | return { 18 | Field() { 19 | knownArgNames = Object.create(null); 20 | }, 21 | Directive() { 22 | knownArgNames = Object.create(null); 23 | }, 24 | Argument(node) { 25 | const argName = node.name.value; 26 | if (knownArgNames[argName]) { 27 | context.reportError( 28 | new GraphQLError( 29 | `There can be only one argument named "${argName}".`, 30 | [knownArgNames[argName], node.name], 31 | ), 32 | ); 33 | } else { 34 | knownArgNames[argName] = node.name; 35 | } 36 | return false; 37 | }, 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique argument names 5 | * 6 | * A GraphQL field or directive is only valid if all supplied arguments are 7 | * uniquely named. 8 | */ 9 | export function UniqueArgumentNamesRule(context) { 10 | var knownArgNames = Object.create(null); 11 | return { 12 | Field: function Field() { 13 | knownArgNames = Object.create(null); 14 | }, 15 | Directive: function Directive() { 16 | knownArgNames = Object.create(null); 17 | }, 18 | Argument: function Argument(node) { 19 | var argName = node.name.value; 20 | 21 | if (knownArgNames[argName]) { 22 | context.reportError(new GraphQLError("There can be only one argument named \"".concat(argName, "\"."), [knownArgNames[argName], node.name])); 23 | } else { 24 | knownArgNames[argName] = node.name; 25 | } 26 | 27 | return false; 28 | } 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNames.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueDirectiveNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueDirectiveNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueDirectiveNamesRule as UniqueDirectiveNames } from './UniqueDirectiveNamesRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNames.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "UniqueDirectiveNames", { 7 | enumerable: true, 8 | get: function get() { 9 | return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule; 10 | } 11 | }); 12 | 13 | var _UniqueDirectiveNamesRule = require("./UniqueDirectiveNamesRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNames.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { UniqueDirectiveNamesRule } from 'graphql' 6 | * or 7 | * import { UniqueDirectiveNamesRule } from 'graphql/validation' 8 | */ 9 | export { UniqueDirectiveNamesRule as UniqueDirectiveNames } from './UniqueDirectiveNamesRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNames.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueDirectiveNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueDirectiveNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueDirectiveNamesRule as UniqueDirectiveNames } from "./UniqueDirectiveNamesRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique directive names 6 | * 7 | * A GraphQL document is only valid if all defined directives have unique names. 8 | */ 9 | export function UniqueDirectiveNamesRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique directive names 5 | * 6 | * A GraphQL document is only valid if all defined directives have unique names. 7 | */ 8 | export function UniqueDirectiveNamesRule(context) { 9 | var knownDirectiveNames = Object.create(null); 10 | var schema = context.getSchema(); 11 | return { 12 | DirectiveDefinition: function DirectiveDefinition(node) { 13 | var directiveName = node.name.value; 14 | 15 | if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) { 16 | context.reportError(new GraphQLError("Directive \"@".concat(directiveName, "\" already exists in the schema. It cannot be redefined."), node.name)); 17 | return; 18 | } 19 | 20 | if (knownDirectiveNames[directiveName]) { 21 | context.reportError(new GraphQLError("There can be only one directive named \"@".concat(directiveName, "\"."), [knownDirectiveNames[directiveName], node.name])); 22 | } else { 23 | knownDirectiveNames[directiveName] = node.name; 24 | } 25 | 26 | return false; 27 | } 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique directive names per location 6 | * 7 | * A GraphQL document is only valid if all directives at a given location 8 | * are uniquely named. 9 | */ 10 | export function UniqueDirectivesPerLocationRule( 11 | context: ASTValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueEnumValueNames.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueEnumValueNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueEnumValueNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueEnumValueNamesRule as UniqueEnumValueNames } from './UniqueEnumValueNamesRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueEnumValueNames.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "UniqueEnumValueNames", { 7 | enumerable: true, 8 | get: function get() { 9 | return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule; 10 | } 11 | }); 12 | 13 | var _UniqueEnumValueNamesRule = require("./UniqueEnumValueNamesRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueEnumValueNames.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { UniqueEnumValueNamesRule } from 'graphql' 6 | * or 7 | * import { UniqueEnumValueNamesRule } from 'graphql/validation' 8 | */ 9 | export { UniqueEnumValueNamesRule as UniqueEnumValueNames } from './UniqueEnumValueNamesRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueEnumValueNames.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueEnumValueNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueEnumValueNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueEnumValueNamesRule as UniqueEnumValueNames } from "./UniqueEnumValueNamesRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique enum value names 6 | * 7 | * A GraphQL enum type is only valid if all its values are uniquely named. 8 | */ 9 | export function UniqueEnumValueNamesRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFieldDefinitionNames.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueFieldDefinitionNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueFieldDefinitionNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueFieldDefinitionNamesRule as UniqueFieldDefinitionNames } from './UniqueFieldDefinitionNamesRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFieldDefinitionNames.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "UniqueFieldDefinitionNames", { 7 | enumerable: true, 8 | get: function get() { 9 | return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule; 10 | } 11 | }); 12 | 13 | var _UniqueFieldDefinitionNamesRule = require("./UniqueFieldDefinitionNamesRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFieldDefinitionNames.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { UniqueFieldDefinitionNamesRule } from 'graphql' 6 | * or 7 | * import { UniqueFieldDefinitionNamesRule } from 'graphql/validation' 8 | */ 9 | export { UniqueFieldDefinitionNamesRule as UniqueFieldDefinitionNames } from './UniqueFieldDefinitionNamesRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFieldDefinitionNames.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueFieldDefinitionNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueFieldDefinitionNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueFieldDefinitionNamesRule as UniqueFieldDefinitionNames } from "./UniqueFieldDefinitionNamesRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique field definition names 6 | * 7 | * A GraphQL complex type is only valid if all its fields are uniquely named. 8 | */ 9 | export function UniqueFieldDefinitionNamesRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFragmentNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique fragment names 6 | * 7 | * A GraphQL document is only valid if all defined fragments have unique names. 8 | */ 9 | export function UniqueFragmentNamesRule( 10 | context: ASTValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Unique fragment names 12 | * 13 | * A GraphQL document is only valid if all defined fragments have unique names. 14 | */ 15 | function UniqueFragmentNamesRule(context) { 16 | var knownFragmentNames = Object.create(null); 17 | return { 18 | OperationDefinition: function OperationDefinition() { 19 | return false; 20 | }, 21 | FragmentDefinition: function FragmentDefinition(node) { 22 | var fragmentName = node.name.value; 23 | 24 | if (knownFragmentNames[fragmentName]) { 25 | context.reportError(new _GraphQLError.GraphQLError("There can be only one fragment named \"".concat(fragmentName, "\"."), [knownFragmentNames[fragmentName], node.name])); 26 | } else { 27 | knownFragmentNames[fragmentName] = node.name; 28 | } 29 | 30 | return false; 31 | } 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | 6 | import type { ASTValidationContext } from '../ValidationContext'; 7 | 8 | /** 9 | * Unique fragment names 10 | * 11 | * A GraphQL document is only valid if all defined fragments have unique names. 12 | */ 13 | export function UniqueFragmentNamesRule( 14 | context: ASTValidationContext, 15 | ): ASTVisitor { 16 | const knownFragmentNames = Object.create(null); 17 | return { 18 | OperationDefinition: () => false, 19 | FragmentDefinition(node) { 20 | const fragmentName = node.name.value; 21 | if (knownFragmentNames[fragmentName]) { 22 | context.reportError( 23 | new GraphQLError( 24 | `There can be only one fragment named "${fragmentName}".`, 25 | [knownFragmentNames[fragmentName], node.name], 26 | ), 27 | ); 28 | } else { 29 | knownFragmentNames[fragmentName] = node.name; 30 | } 31 | return false; 32 | }, 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique fragment names 5 | * 6 | * A GraphQL document is only valid if all defined fragments have unique names. 7 | */ 8 | export function UniqueFragmentNamesRule(context) { 9 | var knownFragmentNames = Object.create(null); 10 | return { 11 | OperationDefinition: function OperationDefinition() { 12 | return false; 13 | }, 14 | FragmentDefinition: function FragmentDefinition(node) { 15 | var fragmentName = node.name.value; 16 | 17 | if (knownFragmentNames[fragmentName]) { 18 | context.reportError(new GraphQLError("There can be only one fragment named \"".concat(fragmentName, "\"."), [knownFragmentNames[fragmentName], node.name])); 19 | } else { 20 | knownFragmentNames[fragmentName] = node.name; 21 | } 22 | 23 | return false; 24 | } 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique input field names 6 | * 7 | * A GraphQL input object value is only valid if all supplied fields are 8 | * uniquely named. 9 | */ 10 | export function UniqueInputFieldNamesRule( 11 | context: ASTValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Unique input field names 12 | * 13 | * A GraphQL input object value is only valid if all supplied fields are 14 | * uniquely named. 15 | */ 16 | function UniqueInputFieldNamesRule(context) { 17 | var knownNameStack = []; 18 | var knownNames = Object.create(null); 19 | return { 20 | ObjectValue: { 21 | enter: function enter() { 22 | knownNameStack.push(knownNames); 23 | knownNames = Object.create(null); 24 | }, 25 | leave: function leave() { 26 | knownNames = knownNameStack.pop(); 27 | } 28 | }, 29 | ObjectField: function ObjectField(node) { 30 | var fieldName = node.name.value; 31 | 32 | if (knownNames[fieldName]) { 33 | context.reportError(new _GraphQLError.GraphQLError("There can be only one input field named \"".concat(fieldName, "\"."), [knownNames[fieldName], node.name])); 34 | } else { 35 | knownNames[fieldName] = node.name; 36 | } 37 | } 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | 6 | import type { ASTValidationContext } from '../ValidationContext'; 7 | 8 | /** 9 | * Unique input field names 10 | * 11 | * A GraphQL input object value is only valid if all supplied fields are 12 | * uniquely named. 13 | */ 14 | export function UniqueInputFieldNamesRule( 15 | context: ASTValidationContext, 16 | ): ASTVisitor { 17 | const knownNameStack = []; 18 | let knownNames = Object.create(null); 19 | 20 | return { 21 | ObjectValue: { 22 | enter() { 23 | knownNameStack.push(knownNames); 24 | knownNames = Object.create(null); 25 | }, 26 | leave() { 27 | knownNames = knownNameStack.pop(); 28 | }, 29 | }, 30 | ObjectField(node) { 31 | const fieldName = node.name.value; 32 | if (knownNames[fieldName]) { 33 | context.reportError( 34 | new GraphQLError( 35 | `There can be only one input field named "${fieldName}".`, 36 | [knownNames[fieldName], node.name], 37 | ), 38 | ); 39 | } else { 40 | knownNames[fieldName] = node.name; 41 | } 42 | }, 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique input field names 5 | * 6 | * A GraphQL input object value is only valid if all supplied fields are 7 | * uniquely named. 8 | */ 9 | export function UniqueInputFieldNamesRule(context) { 10 | var knownNameStack = []; 11 | var knownNames = Object.create(null); 12 | return { 13 | ObjectValue: { 14 | enter: function enter() { 15 | knownNameStack.push(knownNames); 16 | knownNames = Object.create(null); 17 | }, 18 | leave: function leave() { 19 | knownNames = knownNameStack.pop(); 20 | } 21 | }, 22 | ObjectField: function ObjectField(node) { 23 | var fieldName = node.name.value; 24 | 25 | if (knownNames[fieldName]) { 26 | context.reportError(new GraphQLError("There can be only one input field named \"".concat(fieldName, "\"."), [knownNames[fieldName], node.name])); 27 | } else { 28 | knownNames[fieldName] = node.name; 29 | } 30 | } 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique operation names 6 | * 7 | * A GraphQL document is only valid if all defined operations have unique names. 8 | */ 9 | export function UniqueOperationNamesRule( 10 | context: ASTValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.UniqueOperationNamesRule = UniqueOperationNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Unique operation names 12 | * 13 | * A GraphQL document is only valid if all defined operations have unique names. 14 | */ 15 | function UniqueOperationNamesRule(context) { 16 | var knownOperationNames = Object.create(null); 17 | return { 18 | OperationDefinition: function OperationDefinition(node) { 19 | var operationName = node.name; 20 | 21 | if (operationName) { 22 | if (knownOperationNames[operationName.value]) { 23 | context.reportError(new _GraphQLError.GraphQLError("There can be only one operation named \"".concat(operationName.value, "\"."), [knownOperationNames[operationName.value], operationName])); 24 | } else { 25 | knownOperationNames[operationName.value] = operationName; 26 | } 27 | } 28 | 29 | return false; 30 | }, 31 | FragmentDefinition: function FragmentDefinition() { 32 | return false; 33 | } 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | 6 | import type { ASTValidationContext } from '../ValidationContext'; 7 | 8 | /** 9 | * Unique operation names 10 | * 11 | * A GraphQL document is only valid if all defined operations have unique names. 12 | */ 13 | export function UniqueOperationNamesRule( 14 | context: ASTValidationContext, 15 | ): ASTVisitor { 16 | const knownOperationNames = Object.create(null); 17 | return { 18 | OperationDefinition(node) { 19 | const operationName = node.name; 20 | if (operationName) { 21 | if (knownOperationNames[operationName.value]) { 22 | context.reportError( 23 | new GraphQLError( 24 | `There can be only one operation named "${operationName.value}".`, 25 | [knownOperationNames[operationName.value], operationName], 26 | ), 27 | ); 28 | } else { 29 | knownOperationNames[operationName.value] = operationName; 30 | } 31 | } 32 | return false; 33 | }, 34 | FragmentDefinition: () => false, 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique operation names 5 | * 6 | * A GraphQL document is only valid if all defined operations have unique names. 7 | */ 8 | export function UniqueOperationNamesRule(context) { 9 | var knownOperationNames = Object.create(null); 10 | return { 11 | OperationDefinition: function OperationDefinition(node) { 12 | var operationName = node.name; 13 | 14 | if (operationName) { 15 | if (knownOperationNames[operationName.value]) { 16 | context.reportError(new GraphQLError("There can be only one operation named \"".concat(operationName.value, "\"."), [knownOperationNames[operationName.value], operationName])); 17 | } else { 18 | knownOperationNames[operationName.value] = operationName; 19 | } 20 | } 21 | 22 | return false; 23 | }, 24 | FragmentDefinition: function FragmentDefinition() { 25 | return false; 26 | } 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationTypes.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueOperationTypesRule } from 'graphql' 5 | * or 6 | * import { UniqueOperationTypesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueOperationTypesRule as UniqueOperationTypes } from './UniqueOperationTypesRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationTypes.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "UniqueOperationTypes", { 7 | enumerable: true, 8 | get: function get() { 9 | return _UniqueOperationTypesRule.UniqueOperationTypesRule; 10 | } 11 | }); 12 | 13 | var _UniqueOperationTypesRule = require("./UniqueOperationTypesRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationTypes.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { UniqueOperationTypesRule } from 'graphql' 6 | * or 7 | * import { UniqueOperationTypesRule } from 'graphql/validation' 8 | */ 9 | export { UniqueOperationTypesRule as UniqueOperationTypes } from './UniqueOperationTypesRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationTypes.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueOperationTypesRule } from 'graphql' 5 | * or 6 | * import { UniqueOperationTypesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueOperationTypesRule as UniqueOperationTypes } from "./UniqueOperationTypesRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueOperationTypesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique operation types 6 | * 7 | * A GraphQL document is only valid if it has only one type per operation. 8 | */ 9 | export function UniqueOperationTypesRule( 10 | context: SDLValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueTypeNames.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueTypeNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueTypeNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueTypeNamesRule as UniqueTypeNames } from './UniqueTypeNamesRule'; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueTypeNames.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "UniqueTypeNames", { 7 | enumerable: true, 8 | get: function get() { 9 | return _UniqueTypeNamesRule.UniqueTypeNamesRule; 10 | } 11 | }); 12 | 13 | var _UniqueTypeNamesRule = require("./UniqueTypeNamesRule.js"); 14 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueTypeNames.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * @deprecated and will be removed in v16 4 | * Please use either: 5 | * import { UniqueTypeNamesRule } from 'graphql' 6 | * or 7 | * import { UniqueTypeNamesRule } from 'graphql/validation' 8 | */ 9 | export { UniqueTypeNamesRule as UniqueTypeNames } from './UniqueTypeNamesRule'; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueTypeNames.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated and will be removed in v16 3 | * Please use either: 4 | * import { UniqueTypeNamesRule } from 'graphql' 5 | * or 6 | * import { UniqueTypeNamesRule } from 'graphql/validation' 7 | */ 8 | export { UniqueTypeNamesRule as UniqueTypeNames } from "./UniqueTypeNamesRule.mjs"; 9 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueTypeNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { SDLValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique type names 6 | * 7 | * A GraphQL document is only valid if all defined types have unique names. 8 | */ 9 | export function UniqueTypeNamesRule(context: SDLValidationContext): ASTVisitor; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueVariableNamesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ASTValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Unique variable names 6 | * 7 | * A GraphQL operation is only valid if all its variables are uniquely named. 8 | */ 9 | export function UniqueVariableNamesRule( 10 | context: ASTValidationContext, 11 | ): ASTVisitor; 12 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueVariableNamesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.UniqueVariableNamesRule = UniqueVariableNamesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | /** 11 | * Unique variable names 12 | * 13 | * A GraphQL operation is only valid if all its variables are uniquely named. 14 | */ 15 | function UniqueVariableNamesRule(context) { 16 | var knownVariableNames = Object.create(null); 17 | return { 18 | OperationDefinition: function OperationDefinition() { 19 | knownVariableNames = Object.create(null); 20 | }, 21 | VariableDefinition: function VariableDefinition(node) { 22 | var variableName = node.variable.name.value; 23 | 24 | if (knownVariableNames[variableName]) { 25 | context.reportError(new _GraphQLError.GraphQLError("There can be only one variable named \"$".concat(variableName, "\"."), [knownVariableNames[variableName], node.variable.name])); 26 | } else { 27 | knownVariableNames[variableName] = node.variable.name; 28 | } 29 | } 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueVariableNamesRule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | import { GraphQLError } from '../../error/GraphQLError'; 3 | 4 | import type { ASTVisitor } from '../../language/visitor'; 5 | import type { VariableDefinitionNode } from '../../language/ast'; 6 | 7 | import type { ASTValidationContext } from '../ValidationContext'; 8 | 9 | /** 10 | * Unique variable names 11 | * 12 | * A GraphQL operation is only valid if all its variables are uniquely named. 13 | */ 14 | export function UniqueVariableNamesRule( 15 | context: ASTValidationContext, 16 | ): ASTVisitor { 17 | let knownVariableNames = Object.create(null); 18 | return { 19 | OperationDefinition() { 20 | knownVariableNames = Object.create(null); 21 | }, 22 | VariableDefinition(node: VariableDefinitionNode) { 23 | const variableName = node.variable.name.value; 24 | if (knownVariableNames[variableName]) { 25 | context.reportError( 26 | new GraphQLError( 27 | `There can be only one variable named "$${variableName}".`, 28 | [knownVariableNames[variableName], node.variable.name], 29 | ), 30 | ); 31 | } else { 32 | knownVariableNames[variableName] = node.variable.name; 33 | } 34 | }, 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | 3 | /** 4 | * Unique variable names 5 | * 6 | * A GraphQL operation is only valid if all its variables are uniquely named. 7 | */ 8 | export function UniqueVariableNamesRule(context) { 9 | var knownVariableNames = Object.create(null); 10 | return { 11 | OperationDefinition: function OperationDefinition() { 12 | knownVariableNames = Object.create(null); 13 | }, 14 | VariableDefinition: function VariableDefinition(node) { 15 | var variableName = node.variable.name.value; 16 | 17 | if (knownVariableNames[variableName]) { 18 | context.reportError(new GraphQLError("There can be only one variable named \"$".concat(variableName, "\"."), [knownVariableNames[variableName], node.variable.name])); 19 | } else { 20 | knownVariableNames[variableName] = node.variable.name; 21 | } 22 | } 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Value literals of correct type 6 | * 7 | * A GraphQL document is only valid if all value literals are of the type 8 | * expected at their position. 9 | */ 10 | export function ValuesOfCorrectTypeRule(context: ValidationContext): ASTVisitor; 11 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/VariablesAreInputTypesRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Variables are input types 6 | * 7 | * A GraphQL operation is only valid if all the variables it defines are of 8 | * input types (scalar, enum, or input object). 9 | */ 10 | export function VariablesAreInputTypesRule( 11 | context: ValidationContext, 12 | ): ASTVisitor; 13 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule; 7 | 8 | var _GraphQLError = require("../../error/GraphQLError.js"); 9 | 10 | var _printer = require("../../language/printer.js"); 11 | 12 | var _definition = require("../../type/definition.js"); 13 | 14 | var _typeFromAST = require("../../utilities/typeFromAST.js"); 15 | 16 | /** 17 | * Variables are input types 18 | * 19 | * A GraphQL operation is only valid if all the variables it defines are of 20 | * input types (scalar, enum, or input object). 21 | */ 22 | function VariablesAreInputTypesRule(context) { 23 | return { 24 | VariableDefinition: function VariableDefinition(node) { 25 | var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type); 26 | 27 | if (type && !(0, _definition.isInputType)(type)) { 28 | var variableName = node.variable.name.value; 29 | var typeName = (0, _printer.print)(node.type); 30 | context.reportError(new _GraphQLError.GraphQLError("Variable \"$".concat(variableName, "\" cannot be non-input type \"").concat(typeName, "\"."), node.type)); 31 | } 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../error/GraphQLError.mjs"; 2 | import { print } from "../../language/printer.mjs"; 3 | import { isInputType } from "../../type/definition.mjs"; 4 | import { typeFromAST } from "../../utilities/typeFromAST.mjs"; 5 | 6 | /** 7 | * Variables are input types 8 | * 9 | * A GraphQL operation is only valid if all the variables it defines are of 10 | * input types (scalar, enum, or input object). 11 | */ 12 | export function VariablesAreInputTypesRule(context) { 13 | return { 14 | VariableDefinition: function VariableDefinition(node) { 15 | var type = typeFromAST(context.getSchema(), node.type); 16 | 17 | if (type && !isInputType(type)) { 18 | var variableName = node.variable.name.value; 19 | var typeName = print(node.type); 20 | context.reportError(new GraphQLError("Variable \"$".concat(variableName, "\" cannot be non-input type \"").concat(typeName, "\"."), node.type)); 21 | } 22 | } 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../language/visitor'; 2 | import { ValidationContext } from '../ValidationContext'; 3 | 4 | /** 5 | * Variables passed to field arguments conform to type 6 | */ 7 | export function VariablesInAllowedPositionRule( 8 | context: ValidationContext, 9 | ): ASTVisitor; 10 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../../language/visitor'; 2 | import { ValidationContext } from '../../ValidationContext'; 3 | 4 | /** 5 | * No deprecated 6 | * 7 | * A GraphQL document is only valid if all selected fields and all used enum values have not been 8 | * deprecated. 9 | * 10 | * Note: This rule is optional and is not part of the Validation section of the GraphQL 11 | * Specification. The main purpose of this rule is detection of deprecated usages and not 12 | * necessarily to forbid their use when querying a service. 13 | */ 14 | export function NoDeprecatedCustomRule(context: ValidationContext): ASTVisitor; 15 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts: -------------------------------------------------------------------------------- 1 | import { ASTVisitor } from '../../../language/visitor'; 2 | import { ValidationContext } from '../../ValidationContext'; 3 | 4 | /** 5 | * Prohibit introspection queries 6 | * 7 | * A GraphQL document is only valid if all fields selected are not fields that 8 | * return an introspection type. 9 | * 10 | * Note: This rule is optional and is not part of the Validation section of the 11 | * GraphQL Specification. This rule effectively disables introspection, which 12 | * does not reflect best practices and should only be done if absolutely necessary. 13 | */ 14 | export function NoSchemaIntrospectionCustomRule( 15 | context: ValidationContext, 16 | ): ASTVisitor; 17 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs: -------------------------------------------------------------------------------- 1 | import { GraphQLError } from "../../../error/GraphQLError.mjs"; 2 | import { getNamedType } from "../../../type/definition.mjs"; 3 | import { isIntrospectionType } from "../../../type/introspection.mjs"; 4 | 5 | /** 6 | * Prohibit introspection queries 7 | * 8 | * A GraphQL document is only valid if all fields selected are not fields that 9 | * return an introspection type. 10 | * 11 | * Note: This rule is optional and is not part of the Validation section of the 12 | * GraphQL Specification. This rule effectively disables introspection, which 13 | * does not reflect best practices and should only be done if absolutely necessary. 14 | */ 15 | export function NoSchemaIntrospectionCustomRule(context) { 16 | return { 17 | Field: function Field(node) { 18 | var type = getNamedType(context.getType()); 19 | 20 | if (type && isIntrospectionType(type)) { 21 | context.reportError(new GraphQLError("GraphQL introspection has been disabled, but the requested query contained the field \"".concat(node.name.value, "\"."), node)); 22 | } 23 | } 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/graphql/validation/specifiedRules.d.ts: -------------------------------------------------------------------------------- 1 | import { ValidationRule, SDLValidationRule } from './ValidationContext'; 2 | 3 | /** 4 | * This set includes all validation rules defined by the GraphQL spec. 5 | * 6 | * The order of the rules in this list has been adjusted to lead to the 7 | * most clear output when encountering multiple validation errors. 8 | */ 9 | export const specifiedRules: ReadonlyArray; 10 | 11 | /** 12 | * @internal 13 | */ 14 | export const specifiedSDLRules: ReadonlyArray; 15 | -------------------------------------------------------------------------------- /node_modules/graphql/version.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A string containing the version of the GraphQL.js library 3 | */ 4 | export const version: string; 5 | 6 | /** 7 | * An object containing the components of the GraphQL.js version string 8 | */ 9 | export const versionInfo: { 10 | major: number; 11 | minor: number; 12 | patch: number; 13 | preReleaseTag: number | null; 14 | }; 15 | -------------------------------------------------------------------------------- /node_modules/graphql/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.versionInfo = exports.version = void 0; 7 | 8 | /** 9 | * Note: This file is autogenerated using "resources/gen-version.js" script and 10 | * automatically updated by "npm version" command. 11 | */ 12 | 13 | /** 14 | * A string containing the version of the GraphQL.js library 15 | */ 16 | var version = '15.8.0'; 17 | /** 18 | * An object containing the components of the GraphQL.js version string 19 | */ 20 | 21 | exports.version = version; 22 | var versionInfo = Object.freeze({ 23 | major: 15, 24 | minor: 8, 25 | patch: 0, 26 | preReleaseTag: null 27 | }); 28 | exports.versionInfo = versionInfo; 29 | -------------------------------------------------------------------------------- /node_modules/graphql/version.js.flow: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | /** 3 | * Note: This file is autogenerated using "resources/gen-version.js" script and 4 | * automatically updated by "npm version" command. 5 | */ 6 | 7 | /** 8 | * A string containing the version of the GraphQL.js library 9 | */ 10 | export const version = '15.8.0'; 11 | 12 | /** 13 | * An object containing the components of the GraphQL.js version string 14 | */ 15 | export const versionInfo = Object.freeze({ 16 | major: 15, 17 | minor: 8, 18 | patch: 0, 19 | preReleaseTag: null, 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/graphql/version.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Note: This file is autogenerated using "resources/gen-version.js" script and 3 | * automatically updated by "npm version" command. 4 | */ 5 | 6 | /** 7 | * A string containing the version of the GraphQL.js library 8 | */ 9 | export var version = '15.8.0'; 10 | /** 11 | * An object containing the components of the GraphQL.js version string 12 | */ 13 | 14 | export var versionInfo = Object.freeze({ 15 | major: 15, 16 | minor: 8, 17 | patch: 0, 18 | preReleaseTag: null 19 | }); 20 | -------------------------------------------------------------------------------- /node_modules/undici-types/README.md: -------------------------------------------------------------------------------- 1 | # undici-types 2 | 3 | This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. 4 | 5 | - [GitHub nodejs/undici](https://github.com/nodejs/undici) 6 | - [Undici Documentation](https://undici.nodejs.org/#/) 7 | -------------------------------------------------------------------------------- /node_modules/undici-types/agent.d.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'url' 2 | import Pool from './pool' 3 | import Dispatcher from "./dispatcher"; 4 | 5 | export default Agent 6 | 7 | declare class Agent extends Dispatcher{ 8 | constructor(opts?: Agent.Options) 9 | /** `true` after `dispatcher.close()` has been called. */ 10 | closed: boolean; 11 | /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ 12 | destroyed: boolean; 13 | /** Dispatches a request. */ 14 | dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; 15 | } 16 | 17 | declare namespace Agent { 18 | export interface Options extends Pool.Options { 19 | /** Default: `(origin, opts) => new Pool(origin, opts)`. */ 20 | factory?(origin: string | URL, opts: Object): Dispatcher; 21 | /** Integer. Default: `0` */ 22 | maxRedirections?: number; 23 | 24 | interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"] 25 | } 26 | 27 | export interface DispatchOptions extends Dispatcher.DispatchOptions { 28 | /** Integer. */ 29 | maxRedirections?: number; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/undici-types/balanced-pool.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from './pool' 2 | import Dispatcher from './dispatcher' 3 | import { URL } from 'url' 4 | 5 | export default BalancedPool 6 | 7 | declare class BalancedPool extends Dispatcher { 8 | constructor(url: string | string[] | URL | URL[], options?: Pool.Options); 9 | 10 | addUpstream(upstream: string | URL): BalancedPool; 11 | removeUpstream(upstream: string | URL): BalancedPool; 12 | upstreams: Array; 13 | 14 | /** `true` after `pool.close()` has been called. */ 15 | closed: boolean; 16 | /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ 17 | destroyed: boolean; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/undici-types/connector.d.ts: -------------------------------------------------------------------------------- 1 | import { TLSSocket, ConnectionOptions } from 'tls' 2 | import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net' 3 | 4 | export default buildConnector 5 | declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector 6 | 7 | declare namespace buildConnector { 8 | export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { 9 | allowH2?: boolean; 10 | maxCachedSessions?: number | null; 11 | socketPath?: string | null; 12 | timeout?: number | null; 13 | port?: number; 14 | keepAlive?: boolean | null; 15 | keepAliveInitialDelay?: number | null; 16 | } 17 | 18 | export interface Options { 19 | hostname: string 20 | host?: string 21 | protocol: string 22 | port: string 23 | servername?: string 24 | localAddress?: string | null 25 | httpSocket?: Socket 26 | } 27 | 28 | export type Callback = (...args: CallbackArgs) => void 29 | type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] 30 | 31 | export interface connector { 32 | (options: buildConnector.Options, callback: buildConnector.Callback): void 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/undici-types/content-type.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface MIMEType { 4 | type: string 5 | subtype: string 6 | parameters: Map 7 | essence: string 8 | } 9 | 10 | /** 11 | * Parse a string to a {@link MIMEType} object. Returns `failure` if the string 12 | * couldn't be parsed. 13 | * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type 14 | */ 15 | export function parseMIMEType (input: string): 'failure' | MIMEType 16 | 17 | /** 18 | * Convert a MIMEType object to a string. 19 | * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type 20 | */ 21 | export function serializeAMimeType (mimeType: MIMEType): string 22 | -------------------------------------------------------------------------------- /node_modules/undici-types/cookies.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import type { Headers } from './fetch' 4 | 5 | export interface Cookie { 6 | name: string 7 | value: string 8 | expires?: Date | number 9 | maxAge?: number 10 | domain?: string 11 | path?: string 12 | secure?: boolean 13 | httpOnly?: boolean 14 | sameSite?: 'Strict' | 'Lax' | 'None' 15 | unparsed?: string[] 16 | } 17 | 18 | export function deleteCookie ( 19 | headers: Headers, 20 | name: string, 21 | attributes?: { name?: string, domain?: string } 22 | ): void 23 | 24 | export function getCookies (headers: Headers): Record 25 | 26 | export function getSetCookies (headers: Headers): Cookie[] 27 | 28 | export function setCookie (headers: Headers, cookie: Cookie): void 29 | -------------------------------------------------------------------------------- /node_modules/undici-types/global-dispatcher.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | export { 4 | getGlobalDispatcher, 5 | setGlobalDispatcher 6 | } 7 | 8 | declare function setGlobalDispatcher(dispatcher: DispatcherImplementation): void; 9 | declare function getGlobalDispatcher(): Dispatcher; 10 | -------------------------------------------------------------------------------- /node_modules/undici-types/global-origin.d.ts: -------------------------------------------------------------------------------- 1 | export { 2 | setGlobalOrigin, 3 | getGlobalOrigin 4 | } 5 | 6 | declare function setGlobalOrigin(origin: string | URL | undefined): void; 7 | declare function getGlobalOrigin(): URL | undefined; -------------------------------------------------------------------------------- /node_modules/undici-types/handlers.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | export declare class RedirectHandler implements Dispatcher.DispatchHandlers{ 4 | constructor (dispatch: Dispatcher, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers) 5 | } 6 | 7 | export declare class DecoratorHandler implements Dispatcher.DispatchHandlers{ 8 | constructor (handler: Dispatcher.DispatchHandlers) 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/undici-types/header.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The header type declaration of `undici`. 3 | */ 4 | export type IncomingHttpHeaders = Record; 5 | -------------------------------------------------------------------------------- /node_modules/undici-types/interceptors.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | type RedirectInterceptorOpts = { maxRedirections?: number } 4 | 5 | export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor 6 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-client.d.ts: -------------------------------------------------------------------------------- 1 | import Client from './client' 2 | import Dispatcher from './dispatcher' 3 | import MockAgent from './mock-agent' 4 | import { MockInterceptor, Interceptable } from './mock-interceptor' 5 | 6 | export default MockClient 7 | 8 | /** MockClient extends the Client API and allows one to mock requests. */ 9 | declare class MockClient extends Client implements Interceptable { 10 | constructor(origin: string, options: MockClient.Options); 11 | /** Intercepts any matching requests that use the same origin as this mock client. */ 12 | intercept(options: MockInterceptor.Options): MockInterceptor; 13 | /** Dispatches a mocked request. */ 14 | dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; 15 | /** Closes the mock client and gracefully waits for enqueued requests to complete. */ 16 | close(): Promise; 17 | } 18 | 19 | declare namespace MockClient { 20 | /** MockClient options. */ 21 | export interface Options extends Client.Options { 22 | /** The agent to associate this MockClient with. */ 23 | agent: MockAgent; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-errors.d.ts: -------------------------------------------------------------------------------- 1 | import Errors from './errors' 2 | 3 | export default MockErrors 4 | 5 | declare namespace MockErrors { 6 | /** The request does not match any registered mock dispatches. */ 7 | export class MockNotMatchedError extends Errors.UndiciError { 8 | constructor(message?: string); 9 | name: 'MockNotMatchedError'; 10 | code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-pool.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from './pool' 2 | import MockAgent from './mock-agent' 3 | import { Interceptable, MockInterceptor } from './mock-interceptor' 4 | import Dispatcher from './dispatcher' 5 | 6 | export default MockPool 7 | 8 | /** MockPool extends the Pool API and allows one to mock requests. */ 9 | declare class MockPool extends Pool implements Interceptable { 10 | constructor(origin: string, options: MockPool.Options); 11 | /** Intercepts any matching requests that use the same origin as this mock pool. */ 12 | intercept(options: MockInterceptor.Options): MockInterceptor; 13 | /** Dispatches a mocked request. */ 14 | dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; 15 | /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ 16 | close(): Promise; 17 | } 18 | 19 | declare namespace MockPool { 20 | /** MockPool options. */ 21 | export interface Options extends Pool.Options { 22 | /** The agent to associate this MockPool with. */ 23 | agent: MockAgent; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/undici-types/pool-stats.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from "./pool" 2 | 3 | export default PoolStats 4 | 5 | declare class PoolStats { 6 | constructor(pool: Pool); 7 | /** Number of open socket connections in this pool. */ 8 | connected: number; 9 | /** Number of open socket connections in this pool that do not have an active request. */ 10 | free: number; 11 | /** Number of pending requests across all clients in this pool. */ 12 | pending: number; 13 | /** Number of queued requests across all clients in this pool. */ 14 | queued: number; 15 | /** Number of currently active requests across all clients in this pool. */ 16 | running: number; 17 | /** Number of active, pending, or queued requests across all clients in this pool. */ 18 | size: number; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/undici-types/pool.d.ts: -------------------------------------------------------------------------------- 1 | import Client from './client' 2 | import TPoolStats from './pool-stats' 3 | import { URL } from 'url' 4 | import Dispatcher from "./dispatcher"; 5 | 6 | export default Pool 7 | 8 | declare class Pool extends Dispatcher { 9 | constructor(url: string | URL, options?: Pool.Options) 10 | /** `true` after `pool.close()` has been called. */ 11 | closed: boolean; 12 | /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ 13 | destroyed: boolean; 14 | /** Aggregate stats for a Pool. */ 15 | readonly stats: TPoolStats; 16 | } 17 | 18 | declare namespace Pool { 19 | export type PoolStats = TPoolStats; 20 | export interface Options extends Client.Options { 21 | /** Default: `(origin, opts) => new Client(origin, opts)`. */ 22 | factory?(origin: URL, opts: object): Dispatcher; 23 | /** The max number of clients to create. `null` if no limit. Default `null`. */ 24 | connections?: number | null; 25 | 26 | interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options["interceptors"] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/undici-types/proxy-agent.d.ts: -------------------------------------------------------------------------------- 1 | import Agent from './agent' 2 | import buildConnector from './connector'; 3 | import Client from './client' 4 | import Dispatcher from './dispatcher' 5 | import { IncomingHttpHeaders } from './header' 6 | import Pool from './pool' 7 | 8 | export default ProxyAgent 9 | 10 | declare class ProxyAgent extends Dispatcher { 11 | constructor(options: ProxyAgent.Options | string) 12 | 13 | dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; 14 | close(): Promise; 15 | } 16 | 17 | declare namespace ProxyAgent { 18 | export interface Options extends Agent.Options { 19 | uri: string; 20 | /** 21 | * @deprecated use opts.token 22 | */ 23 | auth?: string; 24 | token?: string; 25 | headers?: IncomingHttpHeaders; 26 | requestTls?: buildConnector.BuildOptions; 27 | proxyTls?: buildConnector.BuildOptions; 28 | clientFactory?(origin: URL, opts: object): Dispatcher; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "graphql": "^15.8.0" 4 | }, 5 | "devDependencies": { 6 | "@types/arangodb": "^3.5.22" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /scripts/teardown.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const db = require('@arangodb').db; 3 | 4 | db._drop(module.context.collectionName('episodes')); 5 | db._drop(module.context.collectionName('characters')); 6 | db._drop(module.context.collectionName('friends')); 7 | db._drop(module.context.collectionName('appearsIn')); 8 | --------------------------------------------------------------------------------