1 | /**
|
2 | * Copyright (c) 2015-present, Facebook, Inc.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | *
|
8 | */
|
9 |
|
10 | /**
|
11 | * GraphQL.js provides a reference implementation for the GraphQL specification
|
12 | * but is also a useful utility for operating on GraphQL files and building
|
13 | * sophisticated tools.
|
14 | *
|
15 | * This primary module exports a general purpose function for fulfilling all
|
16 | * steps of the GraphQL specification in a single operation, but also includes
|
17 | * utilities for every part of the GraphQL specification:
|
18 | *
|
19 | * - Parsing the GraphQL language.
|
20 | * - Building a GraphQL type schema.
|
21 | * - Validating a GraphQL request against a type schema.
|
22 | * - Executing a GraphQL request against a type schema.
|
23 | *
|
24 | * This also includes utility functions for operating on GraphQL types and
|
25 | * GraphQL documents to facilitate building tools.
|
26 | *
|
27 | * You may also import from each sub-directory directly. For example, the
|
28 | * following two import statements are equivalent:
|
29 | *
|
30 | * import { parse } from 'graphql';
|
31 | * import { parse } from 'graphql/language';
|
32 | */
|
33 | // The primary entry point into fulfilling a GraphQL request.
|
34 | export { graphql, graphqlSync } from './graphql'; // Create and operate on GraphQL type definitions and schema.
|
35 |
|
36 | export { GraphQLSchema, // Definitions
|
37 | GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLDirective, // "Enum" of Type Kinds
|
38 | TypeKind, // Scalars
|
39 | specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID, // Built-in Directives defined by the Spec
|
40 | specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, // Constant Deprecation Reason
|
41 | DEFAULT_DEPRECATION_REASON, // Meta-field definitions.
|
42 | SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, // GraphQL Types for introspection.
|
43 | introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, // Predicates
|
44 | isSchema, isDirective, isType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective, // Assertions
|
45 | assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType, // Un-modifiers
|
46 | getNullableType, getNamedType, // Validate GraphQL schema.
|
47 | validateSchema, assertValidSchema } from './type';
|
48 | // Parse and operate on GraphQL language source files.
|
49 | export { Source, getLocation, // Parse
|
50 | parse, parseValue, parseType, // Print
|
51 | print, // Visit
|
52 | visit, visitInParallel, visitWithTypeInfo, getVisitFn, Kind, TokenKind, DirectiveLocation, BREAK, // Predicates
|
53 | isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from './language';
|
54 | // Execute GraphQL queries.
|
55 | export { execute, defaultFieldResolver, responsePathAsArray, getDirectiveValues } from './execution';
|
56 | export { subscribe, createSourceEventStream } from './subscription'; // Validate GraphQL queries.
|
57 |
|
58 | export { validate, ValidationContext, // All validation rules in the GraphQL Specification.
|
59 | specifiedRules, // Individual validation rules.
|
60 | FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule } from './validation';
|
61 | // Create, format, and print GraphQL errors.
|
62 | export { GraphQLError, formatError, printError } from './error';
|
63 | // Utilities for operating on GraphQL type schema and parsed sources.
|
64 | export { // Produce the GraphQL query recommended for a full schema introspection.
|
65 | // Accepts optional IntrospectionOptions.
|
66 | getIntrospectionQuery, // @deprecated: use getIntrospectionQuery - will be removed in v15
|
67 | introspectionQuery, // Gets the target Operation from a Document
|
68 | getOperationAST, // Gets the Type for the target Operation AST.
|
69 | getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery
|
70 | introspectionFromSchema, // Build a GraphQLSchema from an introspection result.
|
71 | buildClientSchema, // Build a GraphQLSchema from a parsed GraphQL Schema language AST.
|
72 | buildASTSchema, // Build a GraphQLSchema from a GraphQL schema language document.
|
73 | buildSchema, // @deprecated: Get the description from a schema AST node and supports legacy
|
74 | // syntax for specifying descriptions - will be removed in v16
|
75 | getDescription, // Extends an existing GraphQLSchema from a parsed GraphQL Schema
|
76 | // language AST.
|
77 | extendSchema, // Sort a GraphQLSchema.
|
78 | lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language.
|
79 | printSchema, // Prints the built-in introspection schema in the Schema Language
|
80 | // format.
|
81 | printIntrospectionSchema, // Print a GraphQLType to GraphQL Schema language.
|
82 | printType, // Create a GraphQLType from a GraphQL language AST.
|
83 | typeFromAST, // Create a JavaScript value from a GraphQL language AST with a Type.
|
84 | valueFromAST, // Create a JavaScript value from a GraphQL language AST without a Type.
|
85 | valueFromASTUntyped, // Create a GraphQL language AST from a JavaScript value.
|
86 | astFromValue, // A helper to use within recursive-descent visitors which need to be aware of
|
87 | // the GraphQL type system.
|
88 | TypeInfo, // Coerces a JavaScript value to a GraphQL type, or produces errors.
|
89 | coerceValue, // @deprecated use coerceValue - will be removed in v15
|
90 | isValidJSValue, // @deprecated use validation - will be removed in v15
|
91 | isValidLiteralValue, // Concatenates multiple AST together.
|
92 | concatAST, // Separates an AST into an AST per Operation.
|
93 | separateOperations, // Comparators for types
|
94 | isEqualType, isTypeSubTypeOf, doTypesOverlap, // Asserts a string is a valid GraphQL name.
|
95 | assertValidName, // Determine if a string is a valid GraphQL name.
|
96 | isValidNameError, // Compares two GraphQLSchemas and detects breaking changes.
|
97 | findBreakingChanges, findDangerousChanges, BreakingChangeType, DangerousChangeType, // Report all deprecated usage within a GraphQL document.
|
98 | findDeprecatedUsages } from './utilities'; |
\ | No newline at end of file |