graphql 14.1.1 → 14.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/error/GraphQLError.js +12 -10
- package/error/GraphQLError.js.flow +11 -6
- package/error/GraphQLError.mjs +20 -3
- package/error/formatError.js +2 -2
- package/error/formatError.js.flow +3 -3
- package/error/formatError.mjs +2 -2
- package/error/index.js +1 -1
- package/error/index.js.flow +5 -2
- package/error/index.mjs +2 -2
- package/error/locatedError.js +2 -2
- package/error/locatedError.js.flow +2 -2
- package/error/locatedError.mjs +2 -2
- package/error/printError.js +2 -2
- package/error/printError.js.flow +4 -5
- package/error/printError.mjs +2 -2
- package/error/syntaxError.js +2 -2
- package/error/syntaxError.js.flow +2 -2
- package/error/syntaxError.mjs +2 -2
- package/execution/execute.js +52 -37
- package/execution/execute.js.flow +66 -51
- package/execution/execute.mjs +50 -38
- package/execution/index.js +7 -1
- package/execution/index.js.flow +9 -4
- package/execution/index.mjs +3 -3
- package/execution/values.js +11 -11
- package/execution/values.js.flow +23 -19
- package/execution/values.mjs +11 -11
- package/graphql.js +13 -9
- package/graphql.js.flow +28 -10
- package/graphql.mjs +10 -9
- package/index.js +83 -53
- package/index.js.flow +60 -47
- package/index.mjs +26 -23
- package/jsutils/ObjMap.js +1 -1
- package/jsutils/ObjMap.js.flow +1 -1
- package/jsutils/ObjMap.mjs +1 -0
- package/jsutils/PromiseOrValue.js +1 -0
- package/jsutils/{MaybePromise.js.flow → PromiseOrValue.js.flow} +2 -2
- package/jsutils/PromiseOrValue.mjs +1 -0
- package/jsutils/dedent.js +2 -2
- package/jsutils/dedent.js.flow +1 -1
- package/jsutils/dedent.mjs +2 -2
- package/jsutils/defineToJSON.js +2 -2
- package/jsutils/defineToJSON.js.flow +1 -1
- package/jsutils/defineToJSON.mjs +2 -2
- package/jsutils/defineToStringTag.js +2 -2
- package/jsutils/defineToStringTag.js.flow +1 -1
- package/jsutils/defineToStringTag.mjs +2 -2
- package/jsutils/inspect.js +94 -19
- package/jsutils/inspect.js.flow +98 -20
- package/jsutils/inspect.mjs +94 -20
- package/jsutils/instanceOf.js +2 -2
- package/jsutils/instanceOf.js.flow +1 -1
- package/jsutils/instanceOf.mjs +2 -2
- package/jsutils/invariant.js +5 -3
- package/jsutils/invariant.js.flow +3 -2
- package/jsutils/invariant.mjs +5 -3
- package/jsutils/isInvalid.js +2 -2
- package/jsutils/isInvalid.js.flow +1 -1
- package/jsutils/isInvalid.mjs +2 -2
- package/jsutils/isNullish.js +2 -2
- package/jsutils/isNullish.js.flow +1 -1
- package/jsutils/isNullish.mjs +2 -2
- package/jsutils/isPromise.js +2 -2
- package/jsutils/isPromise.js.flow +1 -1
- package/jsutils/isPromise.mjs +2 -2
- package/jsutils/keyMap.js +4 -3
- package/jsutils/keyMap.js.flow +6 -6
- package/jsutils/keyMap.mjs +4 -3
- package/jsutils/keyValMap.js +4 -3
- package/jsutils/keyValMap.js.flow +6 -6
- package/jsutils/keyValMap.mjs +4 -3
- package/jsutils/mapValue.js +2 -2
- package/jsutils/mapValue.js.flow +2 -2
- package/jsutils/mapValue.mjs +2 -2
- package/jsutils/memoize3.js +3 -3
- package/jsutils/memoize3.js.flow +2 -2
- package/jsutils/memoize3.mjs +3 -3
- package/jsutils/nodejsCustomInspectSymbol.js +2 -2
- package/jsutils/nodejsCustomInspectSymbol.js.flow +1 -1
- package/jsutils/nodejsCustomInspectSymbol.mjs +2 -2
- package/jsutils/orList.js +2 -2
- package/jsutils/orList.js.flow +1 -1
- package/jsutils/orList.mjs +2 -2
- package/jsutils/promiseForObject.js +2 -2
- package/jsutils/promiseForObject.js.flow +2 -2
- package/jsutils/promiseForObject.mjs +2 -2
- package/jsutils/promiseReduce.js +2 -2
- package/jsutils/promiseReduce.js.flow +5 -5
- package/jsutils/promiseReduce.mjs +2 -2
- package/jsutils/quotedOrList.js +2 -2
- package/jsutils/quotedOrList.js.flow +1 -1
- package/jsutils/quotedOrList.mjs +2 -2
- package/jsutils/suggestionList.js +2 -2
- package/jsutils/suggestionList.js.flow +1 -1
- package/jsutils/suggestionList.mjs +2 -2
- package/language/ast.js +1 -1
- package/language/ast.js.flow +3 -3
- package/language/ast.mjs +1 -0
- package/language/blockString.js +114 -0
- package/language/blockString.js.flow +102 -0
- package/language/blockString.mjs +104 -0
- package/language/directiveLocation.js +2 -2
- package/language/directiveLocation.js.flow +1 -1
- package/language/directiveLocation.mjs +2 -2
- package/language/index.js +9 -9
- package/language/index.js.flow +10 -5
- package/language/index.mjs +3 -3
- package/language/kinds.js +2 -2
- package/language/kinds.js.flow +1 -1
- package/language/kinds.mjs +2 -2
- package/language/lexer.js +52 -44
- package/language/lexer.js.flow +65 -54
- package/language/lexer.mjs +49 -43
- package/language/location.js +2 -2
- package/language/location.js.flow +2 -2
- package/language/location.mjs +2 -2
- package/language/parser.js +75 -67
- package/language/parser.js.flow +138 -127
- package/language/parser.mjs +76 -68
- package/language/predicates.js +2 -2
- package/language/predicates.js.flow +2 -2
- package/language/predicates.mjs +2 -2
- package/language/printer.js +6 -14
- package/language/printer.js.flow +8 -17
- package/language/printer.mjs +5 -14
- package/language/source.js +2 -2
- package/language/source.js.flow +1 -1
- package/language/source.mjs +2 -2
- package/language/visitor.js +4 -6
- package/language/visitor.js.flow +3 -3
- package/language/visitor.mjs +4 -6
- package/package.json +1 -1
- package/polyfills/find.js +2 -2
- package/polyfills/find.js.flow +1 -1
- package/polyfills/find.mjs +2 -2
- package/polyfills/flatMap.js +38 -0
- package/polyfills/flatMap.js.flow +34 -0
- package/polyfills/flatMap.mjs +30 -0
- package/polyfills/isFinite.js +2 -2
- package/polyfills/isFinite.js.flow +1 -1
- package/polyfills/isFinite.mjs +2 -2
- package/polyfills/isInteger.js +2 -2
- package/polyfills/isInteger.js.flow +1 -1
- package/polyfills/isInteger.mjs +2 -2
- package/polyfills/objectEntries.js +2 -2
- package/polyfills/objectEntries.js.flow +2 -2
- package/polyfills/objectEntries.mjs +2 -2
- package/polyfills/objectValues.js +2 -2
- package/polyfills/objectValues.js.flow +2 -2
- package/polyfills/objectValues.mjs +2 -2
- package/subscription/asyncIteratorReject.js +1 -1
- package/subscription/asyncIteratorReject.js.flow +1 -1
- package/subscription/asyncIteratorReject.mjs +2 -2
- package/subscription/index.js +1 -1
- package/subscription/index.js.flow +1 -1
- package/subscription/index.mjs +2 -2
- package/subscription/mapAsyncIterator.js +1 -1
- package/subscription/mapAsyncIterator.js.flow +5 -5
- package/subscription/mapAsyncIterator.mjs +2 -2
- package/subscription/subscribe.js +2 -2
- package/subscription/subscribe.js.flow +6 -6
- package/subscription/subscribe.mjs +2 -2
- package/type/definition.js +138 -22
- package/type/definition.js.flow +184 -36
- package/type/definition.mjs +136 -23
- package/type/directives.js +14 -3
- package/type/directives.js.flow +24 -11
- package/type/directives.mjs +16 -5
- package/type/index.js +7 -7
- package/type/index.js.flow +8 -4
- package/type/index.mjs +10 -6
- package/type/introspection.js +14 -9
- package/type/introspection.js.flow +12 -18
- package/type/introspection.mjs +14 -9
- package/type/scalars.js +5 -4
- package/type/scalars.js.flow +4 -10
- package/type/scalars.mjs +7 -6
- package/type/schema.js +55 -3
- package/type/schema.js.flow +73 -17
- package/type/schema.mjs +56 -4
- package/type/validate.js +19 -47
- package/type/validate.js.flow +17 -29
- package/type/validate.mjs +18 -47
- package/utilities/TypeInfo.js +93 -73
- package/utilities/TypeInfo.js.flow +30 -23
- package/utilities/TypeInfo.mjs +93 -73
- package/utilities/assertValidName.js +2 -2
- package/utilities/assertValidName.js.flow +2 -2
- package/utilities/assertValidName.mjs +2 -2
- package/utilities/astFromValue.js +5 -4
- package/utilities/astFromValue.js.flow +8 -7
- package/utilities/astFromValue.mjs +7 -6
- package/utilities/buildASTSchema.js +63 -62
- package/utilities/buildASTSchema.js.flow +92 -108
- package/utilities/buildASTSchema.mjs +61 -62
- package/utilities/buildClientSchema.js +38 -45
- package/utilities/buildClientSchema.js.flow +66 -79
- package/utilities/buildClientSchema.mjs +37 -44
- package/utilities/coerceValue.js +6 -7
- package/utilities/coerceValue.js.flow +5 -4
- package/utilities/coerceValue.mjs +7 -8
- package/utilities/concatAST.js +9 -13
- package/utilities/concatAST.js.flow +4 -10
- package/utilities/concatAST.mjs +6 -13
- package/utilities/extendSchema.js +219 -511
- package/utilities/extendSchema.js.flow +195 -304
- package/utilities/extendSchema.mjs +218 -512
- package/utilities/findBreakingChanges.js +54 -95
- package/utilities/findBreakingChanges.js.flow +49 -47
- package/utilities/findBreakingChanges.mjs +80 -95
- package/utilities/findDeprecatedUsages.js +4 -4
- package/utilities/findDeprecatedUsages.js.flow +5 -5
- package/utilities/findDeprecatedUsages.mjs +4 -4
- package/utilities/getOperationAST.js +2 -2
- package/utilities/getOperationAST.js.flow +5 -2
- package/utilities/getOperationAST.mjs +2 -2
- package/utilities/getOperationRootType.js +24 -24
- package/utilities/getOperationRootType.js.flow +40 -35
- package/utilities/getOperationRootType.mjs +24 -24
- package/utilities/index.js +9 -1
- package/utilities/index.js.flow +13 -6
- package/utilities/index.mjs +13 -8
- package/utilities/introspectionFromSchema.js +6 -4
- package/utilities/introspectionFromSchema.js.flow +8 -7
- package/utilities/introspectionFromSchema.mjs +6 -5
- package/utilities/introspectionQuery.js +2 -2
- package/utilities/introspectionQuery.js.flow +2 -2
- package/utilities/introspectionQuery.mjs +2 -2
- package/utilities/isValidJSValue.js +4 -2
- package/utilities/isValidJSValue.js.flow +3 -2
- package/utilities/isValidJSValue.mjs +4 -2
- package/utilities/isValidLiteralValue.js +2 -2
- package/utilities/isValidLiteralValue.js.flow +4 -4
- package/utilities/isValidLiteralValue.mjs +2 -2
- package/utilities/lexicographicSortSchema.js +84 -123
- package/utilities/lexicographicSortSchema.js.flow +68 -96
- package/utilities/lexicographicSortSchema.mjs +84 -123
- package/utilities/schemaPrinter.js +47 -73
- package/utilities/schemaPrinter.js.flow +69 -120
- package/utilities/schemaPrinter.mjs +45 -72
- package/utilities/separateOperations.js +8 -12
- package/utilities/separateOperations.js.flow +6 -3
- package/utilities/separateOperations.mjs +8 -12
- package/utilities/stripIgnoredCharacters.js +140 -0
- package/utilities/stripIgnoredCharacters.js.flow +129 -0
- package/utilities/stripIgnoredCharacters.mjs +127 -0
- package/utilities/typeComparators.js +2 -2
- package/utilities/typeComparators.js.flow +4 -3
- package/utilities/typeComparators.mjs +2 -2
- package/utilities/typeFromAST.js +9 -4
- package/utilities/typeFromAST.js.flow +15 -9
- package/utilities/typeFromAST.mjs +6 -4
- package/utilities/valueFromAST.js +7 -4
- package/utilities/valueFromAST.js.flow +7 -5
- package/utilities/valueFromAST.mjs +6 -4
- package/utilities/valueFromASTUntyped.js +11 -6
- package/utilities/valueFromASTUntyped.js.flow +9 -5
- package/utilities/valueFromASTUntyped.mjs +10 -6
- package/validation/ValidationContext.js +1 -1
- package/validation/ValidationContext.js.flow +19 -20
- package/validation/ValidationContext.mjs +2 -2
- package/validation/index.js +1 -1
- package/validation/index.js.flow +2 -1
- package/validation/index.mjs +3 -2
- package/validation/rules/ExecutableDefinitions.js +3 -3
- package/validation/rules/ExecutableDefinitions.js.flow +4 -4
- package/validation/rules/ExecutableDefinitions.mjs +3 -3
- package/validation/rules/FieldsOnCorrectType.js +3 -3
- package/validation/rules/FieldsOnCorrectType.js.flow +7 -7
- package/validation/rules/FieldsOnCorrectType.mjs +3 -3
- package/validation/rules/FragmentsOnCompositeTypes.js +4 -4
- package/validation/rules/FragmentsOnCompositeTypes.js.flow +5 -5
- package/validation/rules/FragmentsOnCompositeTypes.mjs +4 -4
- package/validation/rules/KnownArgumentNames.js +1 -1
- package/validation/rules/KnownArgumentNames.js.flow +5 -5
- package/validation/rules/KnownArgumentNames.mjs +2 -2
- package/validation/rules/KnownDirectives.js +8 -6
- package/validation/rules/KnownDirectives.js.flow +11 -9
- package/validation/rules/KnownDirectives.mjs +8 -6
- package/validation/rules/KnownFragmentNames.js +3 -3
- package/validation/rules/KnownFragmentNames.js.flow +4 -4
- package/validation/rules/KnownFragmentNames.mjs +3 -3
- package/validation/rules/KnownTypeNames.js +2 -2
- package/validation/rules/KnownTypeNames.js.flow +6 -6
- package/validation/rules/KnownTypeNames.mjs +2 -2
- package/validation/rules/LoneAnonymousOperation.js +3 -3
- package/validation/rules/LoneAnonymousOperation.js.flow +4 -4
- package/validation/rules/LoneAnonymousOperation.mjs +3 -3
- package/validation/rules/LoneSchemaDefinition.js +2 -2
- package/validation/rules/LoneSchemaDefinition.js.flow +3 -3
- package/validation/rules/LoneSchemaDefinition.mjs +2 -2
- package/validation/rules/NoFragmentCycles.js +2 -2
- package/validation/rules/NoFragmentCycles.js.flow +4 -4
- package/validation/rules/NoFragmentCycles.mjs +2 -2
- package/validation/rules/NoUndefinedVariables.js +2 -2
- package/validation/rules/NoUndefinedVariables.js.flow +3 -3
- package/validation/rules/NoUndefinedVariables.mjs +2 -2
- package/validation/rules/NoUnusedFragments.js +7 -7
- package/validation/rules/NoUnusedFragments.js.flow +4 -4
- package/validation/rules/NoUnusedFragments.mjs +7 -7
- package/validation/rules/NoUnusedVariables.js +5 -5
- package/validation/rules/NoUnusedVariables.js.flow +6 -5
- package/validation/rules/NoUnusedVariables.mjs +5 -5
- package/validation/rules/OverlappingFieldsCanBeMerged.js +26 -23
- package/validation/rules/OverlappingFieldsCanBeMerged.js.flow +17 -17
- package/validation/rules/OverlappingFieldsCanBeMerged.mjs +26 -23
- package/validation/rules/PossibleFragmentSpreads.js +4 -4
- package/validation/rules/PossibleFragmentSpreads.js.flow +5 -5
- package/validation/rules/PossibleFragmentSpreads.mjs +4 -4
- package/validation/rules/PossibleTypeExtensions.js +3 -3
- package/validation/rules/PossibleTypeExtensions.js.flow +5 -5
- package/validation/rules/PossibleTypeExtensions.mjs +4 -4
- package/validation/rules/ProvidedRequiredArguments.js +6 -8
- package/validation/rules/ProvidedRequiredArguments.js.flow +8 -8
- package/validation/rules/ProvidedRequiredArguments.mjs +7 -9
- package/validation/rules/ScalarLeafs.js +4 -4
- package/validation/rules/ScalarLeafs.js.flow +6 -6
- package/validation/rules/ScalarLeafs.mjs +4 -4
- package/validation/rules/SingleFieldSubscriptions.js +2 -2
- package/validation/rules/SingleFieldSubscriptions.js.flow +4 -4
- package/validation/rules/SingleFieldSubscriptions.mjs +2 -2
- package/validation/rules/UniqueArgumentNames.js +2 -2
- package/validation/rules/UniqueArgumentNames.js.flow +3 -3
- package/validation/rules/UniqueArgumentNames.mjs +2 -2
- package/validation/rules/UniqueDirectiveNames.js +2 -2
- package/validation/rules/UniqueDirectiveNames.js.flow +3 -3
- package/validation/rules/UniqueDirectiveNames.mjs +2 -2
- package/validation/rules/UniqueDirectivesPerLocation.js +3 -2
- package/validation/rules/UniqueDirectivesPerLocation.js.flow +4 -4
- package/validation/rules/UniqueDirectivesPerLocation.mjs +3 -2
- package/validation/rules/UniqueEnumValueNames.js +4 -8
- package/validation/rules/UniqueEnumValueNames.js.flow +6 -8
- package/validation/rules/UniqueEnumValueNames.mjs +4 -8
- package/validation/rules/UniqueFieldDefinitionNames.js +4 -8
- package/validation/rules/UniqueFieldDefinitionNames.js.flow +6 -8
- package/validation/rules/UniqueFieldDefinitionNames.mjs +4 -8
- package/validation/rules/UniqueFragmentNames.js +2 -2
- package/validation/rules/UniqueFragmentNames.js.flow +3 -3
- package/validation/rules/UniqueFragmentNames.mjs +2 -2
- package/validation/rules/UniqueInputFieldNames.js +2 -4
- package/validation/rules/UniqueInputFieldNames.js.flow +3 -4
- package/validation/rules/UniqueInputFieldNames.mjs +2 -4
- package/validation/rules/UniqueOperationNames.js +2 -2
- package/validation/rules/UniqueOperationNames.js.flow +3 -3
- package/validation/rules/UniqueOperationNames.mjs +2 -2
- package/validation/rules/UniqueOperationTypes.js +2 -2
- package/validation/rules/UniqueOperationTypes.js.flow +3 -3
- package/validation/rules/UniqueOperationTypes.mjs +2 -2
- package/validation/rules/UniqueTypeNames.js +2 -2
- package/validation/rules/UniqueTypeNames.js.flow +4 -4
- package/validation/rules/UniqueTypeNames.mjs +2 -2
- package/validation/rules/UniqueVariableNames.js +2 -2
- package/validation/rules/UniqueVariableNames.js.flow +4 -4
- package/validation/rules/UniqueVariableNames.mjs +2 -2
- package/validation/rules/ValuesOfCorrectType.js +2 -2
- package/validation/rules/ValuesOfCorrectType.js.flow +5 -5
- package/validation/rules/ValuesOfCorrectType.mjs +2 -2
- package/validation/rules/VariablesAreInputTypes.js +3 -3
- package/validation/rules/VariablesAreInputTypes.js.flow +5 -5
- package/validation/rules/VariablesAreInputTypes.mjs +3 -3
- package/validation/rules/VariablesInAllowedPosition.js +3 -3
- package/validation/rules/VariablesInAllowedPosition.js.flow +7 -8
- package/validation/rules/VariablesInAllowedPosition.mjs +3 -3
- package/validation/specifiedRules.js +2 -2
- package/validation/specifiedRules.js.flow +13 -6
- package/validation/specifiedRules.mjs +7 -7
- package/validation/validate.js +2 -2
- package/validation/validate.js.flow +10 -6
- package/validation/validate.mjs +2 -2
- package/jsutils/MaybePromise.js +0 -1
- package/jsutils/MaybePromise.mjs +0 -0
- package/language/blockStringValue.js +0 -73
- package/language/blockStringValue.js.flow +0 -64
- package/language/blockStringValue.mjs +0 -66
package/index.js
CHANGED
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "GraphQLSchema", {
|
|
|
21
21
|
return _type.GraphQLSchema;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "GraphQLDirective", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _type.GraphQLDirective;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "GraphQLScalarType", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function get() {
|
|
@@ -69,18 +75,6 @@ Object.defineProperty(exports, "GraphQLNonNull", {
|
|
|
69
75
|
return _type.GraphQLNonNull;
|
|
70
76
|
}
|
|
71
77
|
});
|
|
72
|
-
Object.defineProperty(exports, "GraphQLDirective", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _type.GraphQLDirective;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "TypeKind", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _type.TypeKind;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
78
|
Object.defineProperty(exports, "specifiedScalarTypes", {
|
|
85
79
|
enumerable: true,
|
|
86
80
|
get: function get() {
|
|
@@ -141,28 +135,16 @@ Object.defineProperty(exports, "GraphQLDeprecatedDirective", {
|
|
|
141
135
|
return _type.GraphQLDeprecatedDirective;
|
|
142
136
|
}
|
|
143
137
|
});
|
|
144
|
-
Object.defineProperty(exports, "
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function get() {
|
|
147
|
-
return _type.DEFAULT_DEPRECATION_REASON;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "SchemaMetaFieldDef", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function get() {
|
|
153
|
-
return _type.SchemaMetaFieldDef;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "TypeMetaFieldDef", {
|
|
138
|
+
Object.defineProperty(exports, "TypeKind", {
|
|
157
139
|
enumerable: true,
|
|
158
140
|
get: function get() {
|
|
159
|
-
return _type.
|
|
141
|
+
return _type.TypeKind;
|
|
160
142
|
}
|
|
161
143
|
});
|
|
162
|
-
Object.defineProperty(exports, "
|
|
144
|
+
Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", {
|
|
163
145
|
enumerable: true,
|
|
164
146
|
get: function get() {
|
|
165
|
-
return _type.
|
|
147
|
+
return _type.DEFAULT_DEPRECATION_REASON;
|
|
166
148
|
}
|
|
167
149
|
});
|
|
168
150
|
Object.defineProperty(exports, "introspectionTypes", {
|
|
@@ -219,6 +201,24 @@ Object.defineProperty(exports, "__TypeKind", {
|
|
|
219
201
|
return _type.__TypeKind;
|
|
220
202
|
}
|
|
221
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "SchemaMetaFieldDef", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _type.SchemaMetaFieldDef;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "TypeMetaFieldDef", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _type.TypeMetaFieldDef;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "TypeNameMetaFieldDef", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function get() {
|
|
219
|
+
return _type.TypeNameMetaFieldDef;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
222
|
Object.defineProperty(exports, "isSchema", {
|
|
223
223
|
enumerable: true,
|
|
224
224
|
get: function get() {
|
|
@@ -513,6 +513,18 @@ Object.defineProperty(exports, "getLocation", {
|
|
|
513
513
|
return _language.getLocation;
|
|
514
514
|
}
|
|
515
515
|
});
|
|
516
|
+
Object.defineProperty(exports, "createLexer", {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function get() {
|
|
519
|
+
return _language.createLexer;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
Object.defineProperty(exports, "TokenKind", {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function get() {
|
|
525
|
+
return _language.TokenKind;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
516
528
|
Object.defineProperty(exports, "parse", {
|
|
517
529
|
enumerable: true,
|
|
518
530
|
get: function get() {
|
|
@@ -561,16 +573,16 @@ Object.defineProperty(exports, "getVisitFn", {
|
|
|
561
573
|
return _language.getVisitFn;
|
|
562
574
|
}
|
|
563
575
|
});
|
|
564
|
-
Object.defineProperty(exports, "
|
|
576
|
+
Object.defineProperty(exports, "BREAK", {
|
|
565
577
|
enumerable: true,
|
|
566
578
|
get: function get() {
|
|
567
|
-
return _language.
|
|
579
|
+
return _language.BREAK;
|
|
568
580
|
}
|
|
569
581
|
});
|
|
570
|
-
Object.defineProperty(exports, "
|
|
582
|
+
Object.defineProperty(exports, "Kind", {
|
|
571
583
|
enumerable: true,
|
|
572
584
|
get: function get() {
|
|
573
|
-
return _language.
|
|
585
|
+
return _language.Kind;
|
|
574
586
|
}
|
|
575
587
|
});
|
|
576
588
|
Object.defineProperty(exports, "DirectiveLocation", {
|
|
@@ -579,12 +591,6 @@ Object.defineProperty(exports, "DirectiveLocation", {
|
|
|
579
591
|
return _language.DirectiveLocation;
|
|
580
592
|
}
|
|
581
593
|
});
|
|
582
|
-
Object.defineProperty(exports, "BREAK", {
|
|
583
|
-
enumerable: true,
|
|
584
|
-
get: function get() {
|
|
585
|
-
return _language.BREAK;
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
594
|
Object.defineProperty(exports, "isDefinitionNode", {
|
|
589
595
|
enumerable: true,
|
|
590
596
|
get: function get() {
|
|
@@ -651,6 +657,12 @@ Object.defineProperty(exports, "defaultFieldResolver", {
|
|
|
651
657
|
return _execution.defaultFieldResolver;
|
|
652
658
|
}
|
|
653
659
|
});
|
|
660
|
+
Object.defineProperty(exports, "defaultTypeResolver", {
|
|
661
|
+
enumerable: true,
|
|
662
|
+
get: function get() {
|
|
663
|
+
return _execution.defaultTypeResolver;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
654
666
|
Object.defineProperty(exports, "responsePathAsArray", {
|
|
655
667
|
enumerable: true,
|
|
656
668
|
get: function get() {
|
|
@@ -849,10 +861,16 @@ Object.defineProperty(exports, "GraphQLError", {
|
|
|
849
861
|
return _error.GraphQLError;
|
|
850
862
|
}
|
|
851
863
|
});
|
|
852
|
-
Object.defineProperty(exports, "
|
|
864
|
+
Object.defineProperty(exports, "syntaxError", {
|
|
853
865
|
enumerable: true,
|
|
854
866
|
get: function get() {
|
|
855
|
-
return _error.
|
|
867
|
+
return _error.syntaxError;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
Object.defineProperty(exports, "locatedError", {
|
|
871
|
+
enumerable: true,
|
|
872
|
+
get: function get() {
|
|
873
|
+
return _error.locatedError;
|
|
856
874
|
}
|
|
857
875
|
});
|
|
858
876
|
Object.defineProperty(exports, "printError", {
|
|
@@ -861,6 +879,12 @@ Object.defineProperty(exports, "printError", {
|
|
|
861
879
|
return _error.printError;
|
|
862
880
|
}
|
|
863
881
|
});
|
|
882
|
+
Object.defineProperty(exports, "formatError", {
|
|
883
|
+
enumerable: true,
|
|
884
|
+
get: function get() {
|
|
885
|
+
return _error.formatError;
|
|
886
|
+
}
|
|
887
|
+
});
|
|
864
888
|
Object.defineProperty(exports, "getIntrospectionQuery", {
|
|
865
889
|
enumerable: true,
|
|
866
890
|
get: function get() {
|
|
@@ -933,16 +957,16 @@ Object.defineProperty(exports, "printSchema", {
|
|
|
933
957
|
return _utilities.printSchema;
|
|
934
958
|
}
|
|
935
959
|
});
|
|
936
|
-
Object.defineProperty(exports, "
|
|
960
|
+
Object.defineProperty(exports, "printType", {
|
|
937
961
|
enumerable: true,
|
|
938
962
|
get: function get() {
|
|
939
|
-
return _utilities.
|
|
963
|
+
return _utilities.printType;
|
|
940
964
|
}
|
|
941
965
|
});
|
|
942
|
-
Object.defineProperty(exports, "
|
|
966
|
+
Object.defineProperty(exports, "printIntrospectionSchema", {
|
|
943
967
|
enumerable: true,
|
|
944
968
|
get: function get() {
|
|
945
|
-
return _utilities.
|
|
969
|
+
return _utilities.printIntrospectionSchema;
|
|
946
970
|
}
|
|
947
971
|
});
|
|
948
972
|
Object.defineProperty(exports, "typeFromAST", {
|
|
@@ -1005,6 +1029,12 @@ Object.defineProperty(exports, "separateOperations", {
|
|
|
1005
1029
|
return _utilities.separateOperations;
|
|
1006
1030
|
}
|
|
1007
1031
|
});
|
|
1032
|
+
Object.defineProperty(exports, "stripIgnoredCharacters", {
|
|
1033
|
+
enumerable: true,
|
|
1034
|
+
get: function get() {
|
|
1035
|
+
return _utilities.stripIgnoredCharacters;
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1008
1038
|
Object.defineProperty(exports, "isEqualType", {
|
|
1009
1039
|
enumerable: true,
|
|
1010
1040
|
get: function get() {
|
|
@@ -1035,28 +1065,28 @@ Object.defineProperty(exports, "isValidNameError", {
|
|
|
1035
1065
|
return _utilities.isValidNameError;
|
|
1036
1066
|
}
|
|
1037
1067
|
});
|
|
1038
|
-
Object.defineProperty(exports, "
|
|
1068
|
+
Object.defineProperty(exports, "BreakingChangeType", {
|
|
1039
1069
|
enumerable: true,
|
|
1040
1070
|
get: function get() {
|
|
1041
|
-
return _utilities.
|
|
1071
|
+
return _utilities.BreakingChangeType;
|
|
1042
1072
|
}
|
|
1043
1073
|
});
|
|
1044
|
-
Object.defineProperty(exports, "
|
|
1074
|
+
Object.defineProperty(exports, "DangerousChangeType", {
|
|
1045
1075
|
enumerable: true,
|
|
1046
1076
|
get: function get() {
|
|
1047
|
-
return _utilities.
|
|
1077
|
+
return _utilities.DangerousChangeType;
|
|
1048
1078
|
}
|
|
1049
1079
|
});
|
|
1050
|
-
Object.defineProperty(exports, "
|
|
1080
|
+
Object.defineProperty(exports, "findBreakingChanges", {
|
|
1051
1081
|
enumerable: true,
|
|
1052
1082
|
get: function get() {
|
|
1053
|
-
return _utilities.
|
|
1083
|
+
return _utilities.findBreakingChanges;
|
|
1054
1084
|
}
|
|
1055
1085
|
});
|
|
1056
|
-
Object.defineProperty(exports, "
|
|
1086
|
+
Object.defineProperty(exports, "findDangerousChanges", {
|
|
1057
1087
|
enumerable: true,
|
|
1058
1088
|
get: function get() {
|
|
1059
|
-
return _utilities.
|
|
1089
|
+
return _utilities.findDangerousChanges;
|
|
1060
1090
|
}
|
|
1061
1091
|
});
|
|
1062
1092
|
Object.defineProperty(exports, "findDeprecatedUsages", {
|
|
@@ -1080,4 +1110,4 @@ var _validation = require("./validation");
|
|
|
1080
1110
|
|
|
1081
1111
|
var _error = require("./error");
|
|
1082
1112
|
|
|
1083
|
-
var _utilities = require("./utilities");
|
|
1113
|
+
var _utilities = require("./utilities");
|
package/index.js.flow
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -37,8 +37,9 @@ export { graphql, graphqlSync } from './graphql';
|
|
|
37
37
|
|
|
38
38
|
// Create and operate on GraphQL type definitions and schema.
|
|
39
39
|
export {
|
|
40
|
-
GraphQLSchema,
|
|
41
40
|
// Definitions
|
|
41
|
+
GraphQLSchema,
|
|
42
|
+
GraphQLDirective,
|
|
42
43
|
GraphQLScalarType,
|
|
43
44
|
GraphQLObjectType,
|
|
44
45
|
GraphQLInterfaceType,
|
|
@@ -47,10 +48,7 @@ export {
|
|
|
47
48
|
GraphQLInputObjectType,
|
|
48
49
|
GraphQLList,
|
|
49
50
|
GraphQLNonNull,
|
|
50
|
-
|
|
51
|
-
// "Enum" of Type Kinds
|
|
52
|
-
TypeKind,
|
|
53
|
-
// Scalars
|
|
51
|
+
// Standard GraphQL Scalars
|
|
54
52
|
specifiedScalarTypes,
|
|
55
53
|
GraphQLInt,
|
|
56
54
|
GraphQLFloat,
|
|
@@ -62,12 +60,10 @@ export {
|
|
|
62
60
|
GraphQLIncludeDirective,
|
|
63
61
|
GraphQLSkipDirective,
|
|
64
62
|
GraphQLDeprecatedDirective,
|
|
63
|
+
// "Enum" of Type Kinds
|
|
64
|
+
TypeKind,
|
|
65
65
|
// Constant Deprecation Reason
|
|
66
66
|
DEFAULT_DEPRECATION_REASON,
|
|
67
|
-
// Meta-field definitions.
|
|
68
|
-
SchemaMetaFieldDef,
|
|
69
|
-
TypeMetaFieldDef,
|
|
70
|
-
TypeNameMetaFieldDef,
|
|
71
67
|
// GraphQL Types for introspection.
|
|
72
68
|
introspectionTypes,
|
|
73
69
|
__Schema,
|
|
@@ -78,6 +74,10 @@ export {
|
|
|
78
74
|
__InputValue,
|
|
79
75
|
__EnumValue,
|
|
80
76
|
__TypeKind,
|
|
77
|
+
// Meta-field definitions.
|
|
78
|
+
SchemaMetaFieldDef,
|
|
79
|
+
TypeMetaFieldDef,
|
|
80
|
+
TypeNameMetaFieldDef,
|
|
81
81
|
// Predicates
|
|
82
82
|
isSchema,
|
|
83
83
|
isDirective,
|
|
@@ -143,6 +143,7 @@ export type {
|
|
|
143
143
|
GraphQLNamedType,
|
|
144
144
|
Thunk,
|
|
145
145
|
GraphQLSchemaConfig,
|
|
146
|
+
GraphQLDirectiveConfig,
|
|
146
147
|
GraphQLArgument,
|
|
147
148
|
GraphQLArgumentConfig,
|
|
148
149
|
GraphQLEnumTypeConfig,
|
|
@@ -168,7 +169,6 @@ export type {
|
|
|
168
169
|
GraphQLScalarTypeConfig,
|
|
169
170
|
GraphQLTypeResolver,
|
|
170
171
|
GraphQLUnionTypeConfig,
|
|
171
|
-
GraphQLDirectiveConfig,
|
|
172
172
|
GraphQLScalarSerializer,
|
|
173
173
|
GraphQLScalarValueParser,
|
|
174
174
|
GraphQLScalarLiteralParser,
|
|
@@ -178,6 +178,9 @@ export type {
|
|
|
178
178
|
export {
|
|
179
179
|
Source,
|
|
180
180
|
getLocation,
|
|
181
|
+
// Lex
|
|
182
|
+
createLexer,
|
|
183
|
+
TokenKind,
|
|
181
184
|
// Parse
|
|
182
185
|
parse,
|
|
183
186
|
parseValue,
|
|
@@ -189,10 +192,9 @@ export {
|
|
|
189
192
|
visitInParallel,
|
|
190
193
|
visitWithTypeInfo,
|
|
191
194
|
getVisitFn,
|
|
195
|
+
BREAK,
|
|
192
196
|
Kind,
|
|
193
|
-
TokenKind,
|
|
194
197
|
DirectiveLocation,
|
|
195
|
-
BREAK,
|
|
196
198
|
// Predicates
|
|
197
199
|
isDefinitionNode,
|
|
198
200
|
isExecutableDefinitionNode,
|
|
@@ -209,16 +211,20 @@ export type {
|
|
|
209
211
|
Lexer,
|
|
210
212
|
ParseOptions,
|
|
211
213
|
SourceLocation,
|
|
214
|
+
Location,
|
|
215
|
+
Token,
|
|
216
|
+
TokenKindEnum,
|
|
217
|
+
KindEnum,
|
|
218
|
+
DirectiveLocationEnum,
|
|
212
219
|
// Visitor utilities
|
|
213
220
|
ASTVisitor,
|
|
214
221
|
Visitor,
|
|
215
222
|
VisitFn,
|
|
216
223
|
VisitorKeyMap,
|
|
217
224
|
// AST nodes
|
|
218
|
-
Location,
|
|
219
|
-
Token,
|
|
220
225
|
ASTNode,
|
|
221
226
|
ASTKindToNode,
|
|
227
|
+
// Each kind of AST node
|
|
222
228
|
NameNode,
|
|
223
229
|
DocumentNode,
|
|
224
230
|
DefinitionNode,
|
|
@@ -272,15 +278,13 @@ export type {
|
|
|
272
278
|
UnionTypeExtensionNode,
|
|
273
279
|
EnumTypeExtensionNode,
|
|
274
280
|
InputObjectTypeExtensionNode,
|
|
275
|
-
KindEnum,
|
|
276
|
-
TokenKindEnum,
|
|
277
|
-
DirectiveLocationEnum,
|
|
278
281
|
} from './language';
|
|
279
282
|
|
|
280
283
|
// Execute GraphQL queries.
|
|
281
284
|
export {
|
|
282
285
|
execute,
|
|
283
286
|
defaultFieldResolver,
|
|
287
|
+
defaultTypeResolver,
|
|
284
288
|
responsePathAsArray,
|
|
285
289
|
getDirectiveValues,
|
|
286
290
|
} from './execution';
|
|
@@ -289,7 +293,7 @@ export type { ExecutionArgs, ExecutionResult } from './execution';
|
|
|
289
293
|
|
|
290
294
|
export { subscribe, createSourceEventStream } from './subscription';
|
|
291
295
|
|
|
292
|
-
// Validate GraphQL
|
|
296
|
+
// Validate GraphQL documents.
|
|
293
297
|
export {
|
|
294
298
|
validate,
|
|
295
299
|
ValidationContext,
|
|
@@ -326,7 +330,13 @@ export {
|
|
|
326
330
|
export type { ValidationRule } from './validation';
|
|
327
331
|
|
|
328
332
|
// Create, format, and print GraphQL errors.
|
|
329
|
-
export {
|
|
333
|
+
export {
|
|
334
|
+
GraphQLError,
|
|
335
|
+
syntaxError,
|
|
336
|
+
locatedError,
|
|
337
|
+
printError,
|
|
338
|
+
formatError,
|
|
339
|
+
} from './error';
|
|
330
340
|
|
|
331
341
|
export type { GraphQLFormattedError } from './error';
|
|
332
342
|
|
|
@@ -335,13 +345,13 @@ export {
|
|
|
335
345
|
// Produce the GraphQL query recommended for a full schema introspection.
|
|
336
346
|
// Accepts optional IntrospectionOptions.
|
|
337
347
|
getIntrospectionQuery,
|
|
338
|
-
// @deprecated: use getIntrospectionQuery - will be removed in v15
|
|
348
|
+
// @deprecated: use getIntrospectionQuery - will be removed in v15.
|
|
339
349
|
introspectionQuery,
|
|
340
|
-
// Gets the target Operation from a Document
|
|
350
|
+
// Gets the target Operation from a Document.
|
|
341
351
|
getOperationAST,
|
|
342
352
|
// Gets the Type for the target Operation AST.
|
|
343
353
|
getOperationRootType,
|
|
344
|
-
// Convert a GraphQLSchema to an IntrospectionQuery
|
|
354
|
+
// Convert a GraphQLSchema to an IntrospectionQuery.
|
|
345
355
|
introspectionFromSchema,
|
|
346
356
|
// Build a GraphQLSchema from an introspection result.
|
|
347
357
|
buildClientSchema,
|
|
@@ -350,7 +360,7 @@ export {
|
|
|
350
360
|
// Build a GraphQLSchema from a GraphQL schema language document.
|
|
351
361
|
buildSchema,
|
|
352
362
|
// @deprecated: Get the description from a schema AST node and supports legacy
|
|
353
|
-
// syntax for specifying descriptions - will be removed in v16
|
|
363
|
+
// syntax for specifying descriptions - will be removed in v16.
|
|
354
364
|
getDescription,
|
|
355
365
|
// Extends an existing GraphQLSchema from a parsed GraphQL Schema
|
|
356
366
|
// language AST.
|
|
@@ -359,11 +369,11 @@ export {
|
|
|
359
369
|
lexicographicSortSchema,
|
|
360
370
|
// Print a GraphQLSchema to GraphQL Schema language.
|
|
361
371
|
printSchema,
|
|
372
|
+
// Print a GraphQLType to GraphQL Schema language.
|
|
373
|
+
printType,
|
|
362
374
|
// Prints the built-in introspection schema in the Schema Language
|
|
363
375
|
// format.
|
|
364
376
|
printIntrospectionSchema,
|
|
365
|
-
// Print a GraphQLType to GraphQL Schema language.
|
|
366
|
-
printType,
|
|
367
377
|
// Create a GraphQLType from a GraphQL language AST.
|
|
368
378
|
typeFromAST,
|
|
369
379
|
// Create a JavaScript value from a GraphQL language AST with a Type.
|
|
@@ -385,6 +395,9 @@ export {
|
|
|
385
395
|
concatAST,
|
|
386
396
|
// Separates an AST into an AST per Operation.
|
|
387
397
|
separateOperations,
|
|
398
|
+
// Strips characters that are not significant to the validity or execution
|
|
399
|
+
// of a GraphQL document.
|
|
400
|
+
stripIgnoredCharacters,
|
|
388
401
|
// Comparators for types
|
|
389
402
|
isEqualType,
|
|
390
403
|
isTypeSubTypeOf,
|
|
@@ -394,38 +407,38 @@ export {
|
|
|
394
407
|
// Determine if a string is a valid GraphQL name.
|
|
395
408
|
isValidNameError,
|
|
396
409
|
// Compares two GraphQLSchemas and detects breaking changes.
|
|
397
|
-
findBreakingChanges,
|
|
398
|
-
findDangerousChanges,
|
|
399
410
|
BreakingChangeType,
|
|
400
411
|
DangerousChangeType,
|
|
412
|
+
findBreakingChanges,
|
|
413
|
+
findDangerousChanges,
|
|
401
414
|
// Report all deprecated usage within a GraphQL document.
|
|
402
415
|
findDeprecatedUsages,
|
|
403
416
|
} from './utilities';
|
|
404
417
|
|
|
405
418
|
export type {
|
|
406
|
-
BuildSchemaOptions,
|
|
407
|
-
BreakingChange,
|
|
408
|
-
DangerousChange,
|
|
409
419
|
IntrospectionOptions,
|
|
410
|
-
|
|
420
|
+
IntrospectionQuery,
|
|
421
|
+
IntrospectionSchema,
|
|
422
|
+
IntrospectionType,
|
|
423
|
+
IntrospectionInputType,
|
|
424
|
+
IntrospectionOutputType,
|
|
425
|
+
IntrospectionScalarType,
|
|
426
|
+
IntrospectionObjectType,
|
|
427
|
+
IntrospectionInterfaceType,
|
|
428
|
+
IntrospectionUnionType,
|
|
411
429
|
IntrospectionEnumType,
|
|
412
|
-
IntrospectionEnumValue,
|
|
413
|
-
IntrospectionField,
|
|
414
430
|
IntrospectionInputObjectType,
|
|
415
|
-
|
|
431
|
+
IntrospectionTypeRef,
|
|
416
432
|
IntrospectionInputTypeRef,
|
|
417
|
-
|
|
418
|
-
IntrospectionInterfaceType,
|
|
419
|
-
IntrospectionListTypeRef,
|
|
433
|
+
IntrospectionOutputTypeRef,
|
|
420
434
|
IntrospectionNamedTypeRef,
|
|
435
|
+
IntrospectionListTypeRef,
|
|
421
436
|
IntrospectionNonNullTypeRef,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
IntrospectionTypeRef,
|
|
430
|
-
IntrospectionUnionType,
|
|
437
|
+
IntrospectionField,
|
|
438
|
+
IntrospectionInputValue,
|
|
439
|
+
IntrospectionEnumValue,
|
|
440
|
+
IntrospectionDirective,
|
|
441
|
+
BuildSchemaOptions,
|
|
442
|
+
BreakingChange,
|
|
443
|
+
DangerousChange,
|
|
431
444
|
} from './utilities';
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -33,53 +33,54 @@
|
|
|
33
33
|
// The primary entry point into fulfilling a GraphQL request.
|
|
34
34
|
export { graphql, graphqlSync } from './graphql'; // Create and operate on GraphQL type definitions and schema.
|
|
35
35
|
|
|
36
|
-
export {
|
|
37
|
-
GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull,
|
|
38
|
-
TypeKind, // Scalars
|
|
36
|
+
export { // Definitions
|
|
37
|
+
GraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, // Standard GraphQL Scalars
|
|
39
38
|
specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID, // Built-in Directives defined by the Spec
|
|
40
|
-
specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, //
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, //
|
|
39
|
+
specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, // "Enum" of Type Kinds
|
|
40
|
+
TypeKind, // Constant Deprecation Reason
|
|
41
|
+
DEFAULT_DEPRECATION_REASON, // GraphQL Types for introspection.
|
|
42
|
+
introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, // Meta-field definitions.
|
|
43
|
+
SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, // Predicates
|
|
44
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
45
|
assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType, // Un-modifiers
|
|
46
46
|
getNullableType, getNamedType, // Validate GraphQL schema.
|
|
47
47
|
validateSchema, assertValidSchema } from './type';
|
|
48
48
|
// Parse and operate on GraphQL language source files.
|
|
49
|
-
export { Source, getLocation, //
|
|
49
|
+
export { Source, getLocation, // Lex
|
|
50
|
+
createLexer, TokenKind, // Parse
|
|
50
51
|
parse, parseValue, parseType, // Print
|
|
51
52
|
print, // Visit
|
|
52
|
-
visit, visitInParallel, visitWithTypeInfo, getVisitFn,
|
|
53
|
+
visit, visitInParallel, visitWithTypeInfo, getVisitFn, BREAK, Kind, DirectiveLocation, // Predicates
|
|
53
54
|
isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from './language';
|
|
54
55
|
// Execute GraphQL queries.
|
|
55
|
-
export { execute, defaultFieldResolver, responsePathAsArray, getDirectiveValues } from './execution';
|
|
56
|
-
export { subscribe, createSourceEventStream } from './subscription'; // Validate GraphQL
|
|
56
|
+
export { execute, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getDirectiveValues } from './execution';
|
|
57
|
+
export { subscribe, createSourceEventStream } from './subscription'; // Validate GraphQL documents.
|
|
57
58
|
|
|
58
59
|
export { validate, ValidationContext, // All validation rules in the GraphQL Specification.
|
|
59
60
|
specifiedRules, // Individual validation rules.
|
|
60
61
|
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
62
|
// Create, format, and print GraphQL errors.
|
|
62
|
-
export { GraphQLError,
|
|
63
|
+
export { GraphQLError, syntaxError, locatedError, printError, formatError } from './error';
|
|
63
64
|
// Utilities for operating on GraphQL type schema and parsed sources.
|
|
64
65
|
export { // Produce the GraphQL query recommended for a full schema introspection.
|
|
65
66
|
// Accepts optional IntrospectionOptions.
|
|
66
|
-
getIntrospectionQuery, // @deprecated: use getIntrospectionQuery - will be removed in v15
|
|
67
|
-
introspectionQuery, // Gets the target Operation from a Document
|
|
67
|
+
getIntrospectionQuery, // @deprecated: use getIntrospectionQuery - will be removed in v15.
|
|
68
|
+
introspectionQuery, // Gets the target Operation from a Document.
|
|
68
69
|
getOperationAST, // Gets the Type for the target Operation AST.
|
|
69
|
-
getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery
|
|
70
|
+
getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery.
|
|
70
71
|
introspectionFromSchema, // Build a GraphQLSchema from an introspection result.
|
|
71
72
|
buildClientSchema, // Build a GraphQLSchema from a parsed GraphQL Schema language AST.
|
|
72
73
|
buildASTSchema, // Build a GraphQLSchema from a GraphQL schema language document.
|
|
73
74
|
buildSchema, // @deprecated: Get the description from a schema AST node and supports legacy
|
|
74
|
-
// syntax for specifying descriptions - will be removed in v16
|
|
75
|
+
// syntax for specifying descriptions - will be removed in v16.
|
|
75
76
|
getDescription, // Extends an existing GraphQLSchema from a parsed GraphQL Schema
|
|
76
77
|
// language AST.
|
|
77
78
|
extendSchema, // Sort a GraphQLSchema.
|
|
78
79
|
lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language.
|
|
79
|
-
printSchema, //
|
|
80
|
+
printSchema, // Print a GraphQLType to GraphQL Schema language.
|
|
81
|
+
printType, // Prints the built-in introspection schema in the Schema Language
|
|
80
82
|
// format.
|
|
81
|
-
printIntrospectionSchema, //
|
|
82
|
-
printType, // Create a GraphQLType from a GraphQL language AST.
|
|
83
|
+
printIntrospectionSchema, // Create a GraphQLType from a GraphQL language AST.
|
|
83
84
|
typeFromAST, // Create a JavaScript value from a GraphQL language AST with a Type.
|
|
84
85
|
valueFromAST, // Create a JavaScript value from a GraphQL language AST without a Type.
|
|
85
86
|
valueFromASTUntyped, // Create a GraphQL language AST from a JavaScript value.
|
|
@@ -90,9 +91,11 @@ coerceValue, // @deprecated use coerceValue - will be removed in v15
|
|
|
90
91
|
isValidJSValue, // @deprecated use validation - will be removed in v15
|
|
91
92
|
isValidLiteralValue, // Concatenates multiple AST together.
|
|
92
93
|
concatAST, // Separates an AST into an AST per Operation.
|
|
93
|
-
separateOperations, //
|
|
94
|
+
separateOperations, // Strips characters that are not significant to the validity or execution
|
|
95
|
+
// of a GraphQL document.
|
|
96
|
+
stripIgnoredCharacters, // Comparators for types
|
|
94
97
|
isEqualType, isTypeSubTypeOf, doTypesOverlap, // Asserts a string is a valid GraphQL name.
|
|
95
98
|
assertValidName, // Determine if a string is a valid GraphQL name.
|
|
96
99
|
isValidNameError, // Compares two GraphQLSchemas and detects breaking changes.
|
|
97
|
-
|
|
98
|
-
findDeprecatedUsages } from './utilities';
|
|
100
|
+
BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges, // Report all deprecated usage within a GraphQL document.
|
|
101
|
+
findDeprecatedUsages } from './utilities';
|
package/jsutils/ObjMap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
package/jsutils/ObjMap.js.flow
CHANGED
package/jsutils/ObjMap.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type PromiseOrValue<+T> = Promise<T> | T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/jsutils/dedent.js
CHANGED
|
@@ -10,7 +10,7 @@ var _invariant = _interopRequireDefault(require("./invariant"));
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -63,4 +63,4 @@ function dedent(strings) {
|
|
|
63
63
|
return next;
|
|
64
64
|
}, '');
|
|
65
65
|
return fixIndent(str);
|
|
66
|
-
}
|
|
66
|
+
}
|
package/jsutils/dedent.js.flow
CHANGED