UNPKG

graphql

Version:

A Query Language and Runtime which can target any service.

55 lines (54 loc) 12.1 kB
/** * The root `graphql` package re-exports the public GraphQL.js API from its * submodules and provides the high-level request pipeline helpers defined in * this module. * * You can import public exports from GraphQL.js modules through the root * `graphql` package or through their module-specific entry point. For example, * these two references resolve to the same `parse` function: * * ```ts * import { parse } from 'graphql'; * import { parse } from 'graphql/language'; * ``` * * Use the root package when you want a single import surface, or use submodules * such as `graphql/language`, `graphql/type`, `graphql/execution`, and * `graphql/utilities` when you want module-focused imports. This module also * defines root-only APIs, such as request pipeline helpers and version * metadata, that do not belong to a narrower submodule. * @packageDocumentation */ export { version, versionInfo } from "./version.mjs"; export { enableDevMode, isDevModeEnabled } from "./devMode.mjs"; export type { GraphQLChannelContextByName, GraphQLChannels, GraphQLExecuteContext, GraphQLExecuteRootSelectionSetContext, GraphQLExecuteVariableCoercionContext, GraphQLParseContext, GraphQLResolveContext, GraphQLSubscribeContext, GraphQLValidateContext, } from "./diagnostics.mjs"; export type { GraphQLArgs } from "./graphql.mjs"; export { graphql, graphqlSync } from "./graphql.mjs"; export { defaultHarness } from "./harness.mjs"; export type { GraphQLHarness, GraphQLParseFn, GraphQLValidateFn, GraphQLExecuteFn, GraphQLSubscribeFn, } from "./harness.mjs"; export type { GraphQLField, GraphQLArgument, GraphQLEnumValue, GraphQLInputField, } from "./type/index.mjs"; export { resolveObjMapThunk, resolveReadonlyArrayThunk, GraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID, GRAPHQL_MAX_INT, GRAPHQL_MIN_INT, specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeferDirective, GraphQLStreamDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective, GraphQLOneOfDirective, TypeKind, DEFAULT_DEPRECATION_REASON, introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, isSchema, isDirective, isType, isScalarType, isObjectType, isField, isArgument, isInterfaceType, isUnionType, isEnumType, isEnumValue, isInputObjectType, isInputField, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective, assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertField, assertArgument, assertInterfaceType, assertUnionType, assertEnumType, assertEnumValue, assertInputObjectType, assertInputField, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType, getNullableType, getNamedType, validateSchema, assertValidSchema, assertName, assertEnumValueName, } from "./type/index.mjs"; export type { GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLLeafType, GraphQLCompositeType, GraphQLAbstractType, GraphQLWrappingType, GraphQLNullableType, GraphQLNullableInputType, GraphQLNullableOutputType, GraphQLNamedType, GraphQLNamedInputType, GraphQLNamedOutputType, ThunkReadonlyArray, ThunkObjMap, GraphQLSchemaConfig, GraphQLSchemaExtensions, GraphQLDirectiveConfig, GraphQLDirectiveExtensions, GraphQLArgumentConfig, GraphQLArgumentExtensions, GraphQLEnumTypeConfig, GraphQLEnumTypeExtensions, GraphQLEnumValueConfig, GraphQLEnumValueConfigMap, GraphQLEnumValueExtensions, GraphQLFieldConfig, GraphQLFieldConfigArgumentMap, GraphQLFieldConfigMap, GraphQLFieldExtensions, GraphQLFieldMap, GraphQLFieldResolver, GraphQLInputFieldConfig, GraphQLInputFieldConfigMap, GraphQLInputFieldExtensions, GraphQLInputFieldMap, GraphQLInputObjectTypeConfig, GraphQLInputObjectTypeExtensions, GraphQLInterfaceTypeConfig, GraphQLInterfaceTypeExtensions, GraphQLIsTypeOfFn, GraphQLObjectTypeConfig, GraphQLObjectTypeExtensions, GraphQLResolveInfo, GraphQLResolveInfoHelpers, ResponsePath, GraphQLScalarTypeConfig, GraphQLScalarTypeExtensions, GraphQLTypeResolver, GraphQLUnionTypeConfig, GraphQLUnionTypeExtensions, GraphQLScalarSerializer, GraphQLScalarValueParser, GraphQLScalarLiteralParser, GraphQLScalarOutputValueCoercer, GraphQLScalarInputValueCoercer, GraphQLScalarInputLiteralCoercer, GraphQLDefaultInput, } from "./type/index.mjs"; export { Kind } from "./language/kinds.mjs"; export { Token, Source, Location, OperationTypeNode, getLocation, printLocation, printSourceLocation, Lexer, TokenKind, parse, parseValue, parseConstValue, parseType, parseSchemaCoordinate, print, visit, visitInParallel, getEnterLeaveForKind, BREAK, DirectiveLocation, isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isConstValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode, isSchemaCoordinateNode, isSubscriptionOperationDefinitionNode, } from "./language/index.mjs"; export type { ParseOptions, SourceLocation, ASTVisitor, ASTVisitFn, ASTVisitorKeyMap, ASTNode, ASTKindToNode, NameNode, DocumentNode, DefinitionNode, ExecutableDefinitionNode, OperationDefinitionNode, SubscriptionOperationDefinitionNode, VariableDefinitionNode, VariableNode, SelectionSetNode, SelectionNode, FieldNode, ArgumentNode, FragmentArgumentNode, ConstArgumentNode, FragmentSpreadNode, InlineFragmentNode, FragmentDefinitionNode, ValueNode, ConstValueNode, IntValueNode, FloatValueNode, StringValueNode, BooleanValueNode, NullValueNode, EnumValueNode, ListValueNode, ConstListValueNode, ObjectValueNode, ConstObjectValueNode, ObjectFieldNode, ConstObjectFieldNode, DirectiveNode, ConstDirectiveNode, TypeNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, TypeSystemDefinitionNode, SchemaDefinitionNode, OperationTypeDefinitionNode, TypeDefinitionNode, ScalarTypeDefinitionNode, ObjectTypeDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, EnumTypeDefinitionNode, EnumValueDefinitionNode, InputObjectTypeDefinitionNode, DirectiveDefinitionNode, TypeSystemExtensionNode, SchemaExtensionNode, TypeExtensionNode, ScalarTypeExtensionNode, ObjectTypeExtensionNode, InterfaceTypeExtensionNode, UnionTypeExtensionNode, EnumTypeExtensionNode, InputObjectTypeExtensionNode, DirectiveExtensionNode, SchemaCoordinateNode, TypeCoordinateNode, MemberCoordinateNode, ArgumentCoordinateNode, DirectiveCoordinateNode, DirectiveArgumentCoordinateNode, } from "./language/index.mjs"; export { AbortedGraphQLExecutionError, execute, executeRootSelectionSet, executeSubscriptionEvent, experimentalExecuteIncrementally, experimentalExecuteRootSelectionSet, legacyExecuteIncrementally, legacyExecuteRootSelectionSet, executeSync, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getArgumentValues, getVariableValues, getDirectiveValues, subscribe, createSourceEventStream, mapSourceToResponseEvent, validateExecutionArgs, validateSubscriptionArgs, } from "./execution/index.mjs"; export type { ExecutionArgs, RootSelectionSetExecutor, AsyncWorkFinishedInfo, ExecutionHooks, VariableValues, ValidatedExecutionArgs, ValidatedSubscriptionArgs, ExecutionResult, ExperimentalIncrementalExecutionResults, InitialIncrementalExecutionResult, SubsequentIncrementalExecutionResult, IncrementalDeferResult, IncrementalStreamResult, IncrementalResult, FormattedExecutionResult, FormattedExperimentalIncrementalExecutionResults, FormattedInitialIncrementalExecutionResult, FormattedSubsequentIncrementalExecutionResult, FormattedIncrementalDeferResult, FormattedIncrementalStreamResult, FormattedIncrementalResult, LegacyExperimentalIncrementalExecutionResults, LegacyInitialIncrementalExecutionResult, LegacySubsequentIncrementalExecutionResult, LegacyIncrementalDeferResult, LegacyIncrementalStreamResult, LegacyIncrementalResult, FormattedLegacyExperimentalIncrementalExecutionResults, FormattedLegacyInitialIncrementalExecutionResult, FormattedLegacySubsequentIncrementalExecutionResult, FormattedLegacyIncrementalDeferResult, FormattedLegacyIncrementalStreamResult, FormattedLegacyIncrementalResult, } from "./execution/index.mjs"; export { validate, ValidationContext, specifiedRules, recommendedRules, DeferStreamDirectiveLabelRule, DeferStreamDirectiveOnRootFieldRule, DeferStreamDirectiveOnValidOperationsRule, ExecutableDefinitionsRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownOperationTypesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, StreamDirectiveOnListFieldRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule, MaxIntrospectionDepthRule, LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueArgumentDefinitionNamesRule, UniqueDirectiveNamesRule, PossibleTypeExtensionsRule, NoDeprecatedCustomRule, NoSchemaIntrospectionCustomRule, } from "./validation/index.mjs"; export type { ValidationOptions, ValidationRule } from "./validation/index.mjs"; export { GraphQLError, syntaxError, locatedError } from "./error/index.mjs"; export type { GraphQLErrorOptions, GraphQLFormattedError, GraphQLErrorExtensions, GraphQLFormattedErrorExtensions, } from "./error/index.mjs"; export { getIntrospectionQuery, getOperationAST, introspectionFromSchema, buildClientSchema, buildASTSchema, buildSchema, extendSchema, lexicographicSortSchema, printSchema, printType, printDirective, printIntrospectionSchema, typeFromAST, /** * Deprecated export retained for compatibility. Use `coerceInputLiteral()` * instead. * @deprecated use `coerceInputLiteral()` instead - will be removed in v18 */ valueFromAST, valueFromASTUntyped, /** * Deprecated export retained for compatibility. Use `valueToLiteral()` * instead, and take care to operate on external values. * @deprecated use `valueToLiteral()` instead with care to operate on external values - `astFromValue()` will be removed in v18 */ astFromValue, TypeInfo, visitWithTypeInfo, replaceVariables, valueToLiteral, coerceInputValue, coerceInputLiteral, validateInputValue, validateInputLiteral, concatAST, separateOperations, stripIgnoredCharacters, isEqualType, isTypeSubTypeOf, doTypesOverlap, BreakingChangeType, DangerousChangeType, SafeChangeType, findBreakingChanges, findDangerousChanges, findSchemaChanges, resolveSchemaCoordinate, resolveASTSchemaCoordinate, } from "./utilities/index.mjs"; export type { IntrospectionOptions, IntrospectionQuery, IntrospectionSchema, IntrospectionType, IntrospectionInputType, IntrospectionOutputType, IntrospectionScalarType, IntrospectionObjectType, IntrospectionInterfaceType, IntrospectionUnionType, IntrospectionEnumType, IntrospectionInputObjectType, IntrospectionTypeRef, IntrospectionInputTypeRef, IntrospectionOutputTypeRef, IntrospectionNamedTypeRef, IntrospectionListTypeRef, IntrospectionNonNullTypeRef, IntrospectionField, IntrospectionInputValue, IntrospectionEnumValue, IntrospectionDirective, BuildSchemaOptions, BreakingChange, SafeChange, DangerousChange, SchemaChange, TypedQueryDocumentNode, ResolvedSchemaElement, } from "./utilities/index.mjs";