graphql 0.12.3 → 0.13.2
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/error/GraphQLError.js +2 -3
- package/error/GraphQLError.js.flow +3 -4
- package/{module/error/GraphQLError.js → error/GraphQLError.mjs} +2 -3
- package/error/formatError.js +1 -1
- package/error/formatError.js.flow +1 -1
- package/{module/error/formatError.js → error/formatError.mjs} +1 -1
- package/error/index.js.flow +1 -1
- package/{module/error/index.js → error/index.mjs} +1 -1
- package/error/locatedError.js +2 -1
- package/error/locatedError.js.flow +2 -1
- package/{module/error/locatedError.js → error/locatedError.mjs} +2 -1
- package/error/printError.js +1 -1
- package/error/printError.js.flow +1 -1
- package/{module/error/printError.js → error/printError.mjs} +1 -1
- package/error/syntaxError.js +1 -1
- package/error/syntaxError.js.flow +1 -1
- package/{module/error/syntaxError.js → error/syntaxError.mjs} +1 -1
- package/execution/execute.js +70 -90
- package/execution/execute.js.flow +83 -106
- package/{module/execution/execute.js → execution/execute.mjs} +53 -81
- package/execution/index.js.flow +1 -1
- package/{module/execution/index.js → execution/index.mjs} +1 -1
- package/execution/values.js +2 -6
- package/execution/values.js.flow +6 -7
- package/{module/execution/values.js → execution/values.mjs} +2 -2
- package/graphql.js +1 -1
- package/graphql.js.flow +3 -2
- package/{module/graphql.js → graphql.mjs} +1 -1
- package/index.js +24 -6
- package/index.js.flow +16 -2
- package/{module/index.js → index.mjs} +10 -2
- package/jsutils/MaybePromise.js +1 -0
- package/{module/jsutils/ObjMap.js.flow → jsutils/MaybePromise.js.flow} +2 -2
- package/{module/jsutils/ObjMap.js → jsutils/MaybePromise.mjs} +0 -0
- package/jsutils/ObjMap.js.flow +1 -1
- package/{module/language/ast.js → jsutils/ObjMap.mjs} +0 -0
- package/jsutils/dedent.js +23 -18
- package/jsutils/dedent.js.flow +21 -20
- package/jsutils/dedent.mjs +50 -0
- package/jsutils/find.js +1 -1
- package/jsutils/find.js.flow +1 -1
- package/{module/jsutils/find.js → jsutils/find.mjs} +1 -1
- package/jsutils/instanceOf.js +17 -16
- package/jsutils/instanceOf.js.flow +21 -15
- package/jsutils/instanceOf.mjs +31 -0
- package/jsutils/invariant.js +1 -1
- package/jsutils/invariant.js.flow +1 -1
- package/{module/jsutils/invariant.js → jsutils/invariant.mjs} +1 -1
- package/jsutils/isInvalid.js +1 -1
- package/jsutils/isInvalid.js.flow +1 -1
- package/{module/jsutils/isInvalid.js → jsutils/isInvalid.mjs} +1 -1
- package/jsutils/isNullish.js +1 -1
- package/jsutils/isNullish.js.flow +1 -1
- package/{module/jsutils/isNullish.js → jsutils/isNullish.mjs} +1 -1
- package/jsutils/isPromise.js +24 -0
- package/jsutils/isPromise.js.flow +20 -0
- package/jsutils/isPromise.mjs +18 -0
- package/jsutils/keyMap.js +1 -1
- package/jsutils/keyMap.js.flow +1 -1
- package/{module/jsutils/keyMap.js → jsutils/keyMap.mjs} +1 -1
- package/jsutils/keyValMap.js +1 -1
- package/jsutils/keyValMap.js.flow +1 -1
- package/{module/jsutils/keyValMap.js → jsutils/keyValMap.mjs} +1 -1
- package/jsutils/memoize3.js +48 -0
- package/jsutils/memoize3.js.flow +44 -0
- package/jsutils/memoize3.mjs +42 -0
- package/jsutils/objectValues.js +24 -0
- package/jsutils/objectValues.js.flow +18 -0
- package/jsutils/objectValues.mjs +19 -0
- package/jsutils/orList.js +1 -1
- package/jsutils/orList.js.flow +1 -1
- package/{module/jsutils/orList.js → jsutils/orList.mjs} +1 -1
- package/jsutils/promiseForObject.js +34 -0
- package/jsutils/promiseForObject.js.flow +30 -0
- package/jsutils/promiseForObject.mjs +28 -0
- package/jsutils/promiseReduce.js +34 -0
- package/jsutils/promiseReduce.js.flow +32 -0
- package/jsutils/promiseReduce.mjs +26 -0
- package/jsutils/quotedOrList.js +1 -1
- package/jsutils/quotedOrList.js.flow +1 -1
- package/{module/jsutils/quotedOrList.js → jsutils/quotedOrList.mjs} +1 -1
- package/jsutils/suggestionList.js +1 -1
- package/jsutils/suggestionList.js.flow +1 -1
- package/{module/jsutils/suggestionList.js → jsutils/suggestionList.mjs} +1 -1
- package/language/ast.js.flow +3 -30
- package/language/ast.mjs +0 -0
- package/language/blockStringValue.js +1 -1
- package/language/blockStringValue.js.flow +1 -1
- package/{module/language/blockStringValue.js → language/blockStringValue.mjs} +1 -1
- package/language/directiveLocation.js +3 -3
- package/language/directiveLocation.js.flow +4 -4
- package/{module/language/directiveLocation.js → language/directiveLocation.mjs} +3 -3
- package/language/index.js +10 -10
- package/language/index.js.flow +5 -4
- package/{module/language/index.js → language/index.mjs} +3 -3
- package/language/kinds.js +70 -71
- package/language/kinds.js.flow +71 -71
- package/language/kinds.mjs +79 -0
- package/language/lexer.js +73 -87
- package/language/lexer.js.flow +87 -93
- package/{module/language/lexer.js → language/lexer.mjs} +73 -87
- package/language/location.js +1 -1
- package/language/location.js.flow +1 -1
- package/{module/language/location.js → language/location.mjs} +1 -1
- package/language/parser.js +68 -58
- package/language/parser.js.flow +104 -110
- package/{module/language/parser.js → language/parser.mjs} +69 -59
- package/language/printer.js +52 -55
- package/language/printer.js.flow +74 -120
- package/{module/language/printer.js → language/printer.mjs} +52 -55
- package/language/source.js +1 -1
- package/language/source.js.flow +1 -1
- package/{module/language/source.js → language/source.mjs} +1 -1
- package/language/visitor.js +1 -1
- package/language/visitor.js.flow +1 -1
- package/{module/language/visitor.js → language/visitor.mjs} +1 -1
- package/package.json +4 -9
- package/subscription/asyncIteratorReject.js +1 -1
- package/subscription/asyncIteratorReject.js.flow +1 -1
- package/{module/subscription/asyncIteratorReject.js → subscription/asyncIteratorReject.mjs} +1 -1
- package/subscription/index.js.flow +1 -1
- package/{module/subscription/index.js → subscription/index.mjs} +1 -1
- package/subscription/mapAsyncIterator.js +3 -1
- package/subscription/mapAsyncIterator.js.flow +7 -4
- package/{module/subscription/mapAsyncIterator.js → subscription/mapAsyncIterator.mjs} +4 -1
- package/subscription/subscribe.js +1 -1
- package/subscription/subscribe.js.flow +1 -1
- package/{module/subscription/subscribe.js → subscription/subscribe.mjs} +1 -1
- package/type/definition.js +76 -10
- package/type/definition.js.flow +105 -13
- package/{module/type/definition.js → type/definition.mjs} +72 -4
- package/type/directives.js +4 -4
- package/type/directives.js.flow +3 -3
- package/{module/type/directives.js → type/directives.mjs} +8 -8
- package/type/index.js +2 -5
- package/type/index.js.flow +6 -5
- package/{module/type/index.js → type/index.mjs} +3 -5
- package/type/introspection.js +34 -41
- package/type/introspection.js.flow +7 -10
- package/{module/type/introspection.js → type/introspection.mjs} +6 -15
- package/type/scalars.js +6 -10
- package/type/scalars.js.flow +2 -2
- package/{module/type/scalars.js → type/scalars.mjs} +2 -2
- package/type/schema.js +39 -15
- package/type/schema.js.flow +73 -22
- package/{module/type/schema.js → type/schema.mjs} +37 -16
- package/type/validate.js +33 -30
- package/type/validate.js.flow +40 -37
- package/{module/type/validate.js → type/validate.mjs} +30 -30
- package/utilities/TypeInfo.js +23 -27
- package/utilities/TypeInfo.js.flow +2 -2
- package/{module/utilities/TypeInfo.js → utilities/TypeInfo.mjs} +2 -2
- package/utilities/assertValidName.js +2 -6
- package/utilities/assertValidName.js.flow +2 -10
- package/{module/utilities/assertValidName.js → utilities/assertValidName.mjs} +2 -6
- package/utilities/astFromValue.js +37 -37
- package/utilities/astFromValue.js.flow +36 -44
- package/{module/utilities/astFromValue.js → utilities/astFromValue.mjs} +26 -25
- package/utilities/buildASTSchema.js +65 -82
- package/utilities/buildASTSchema.js.flow +52 -59
- package/{module/utilities/buildASTSchema.js → utilities/buildASTSchema.mjs} +48 -62
- package/utilities/buildClientSchema.js +12 -15
- package/utilities/buildClientSchema.js.flow +7 -11
- package/{module/utilities/buildClientSchema.js → utilities/buildClientSchema.mjs} +4 -5
- package/utilities/coerceValue.js +1 -1
- package/utilities/coerceValue.js.flow +1 -1
- package/{module/utilities/coerceValue.js → utilities/coerceValue.mjs} +1 -1
- package/utilities/concatAST.js +1 -1
- package/utilities/concatAST.js.flow +1 -1
- package/{module/utilities/concatAST.js → utilities/concatAST.mjs} +1 -1
- package/utilities/extendSchema.js +91 -77
- package/utilities/extendSchema.js.flow +93 -68
- package/{module/utilities/extendSchema.js → utilities/extendSchema.mjs} +65 -52
- package/utilities/findBreakingChanges.js +1 -1
- package/utilities/findBreakingChanges.js.flow +1 -1
- package/{module/utilities/findBreakingChanges.js → utilities/findBreakingChanges.mjs} +1 -1
- package/utilities/findDeprecatedUsages.js +1 -1
- package/utilities/findDeprecatedUsages.js.flow +1 -1
- package/{module/utilities/findDeprecatedUsages.js → utilities/findDeprecatedUsages.mjs} +1 -1
- package/utilities/getOperationAST.js +2 -2
- package/utilities/getOperationAST.js.flow +3 -3
- package/{module/utilities/getOperationAST.js → utilities/getOperationAST.mjs} +3 -3
- package/utilities/index.js +30 -0
- package/utilities/index.js.flow +10 -3
- package/{module/utilities/index.js → utilities/index.mjs} +10 -3
- package/utilities/introspectionFromSchema.js +43 -0
- package/utilities/introspectionFromSchema.js.flow +37 -0
- package/utilities/introspectionFromSchema.mjs +31 -0
- package/utilities/introspectionQuery.js +1 -1
- package/utilities/introspectionQuery.js.flow +1 -1
- package/{module/utilities/introspectionQuery.js → utilities/introspectionQuery.mjs} +1 -1
- package/utilities/isValidJSValue.js +1 -1
- package/utilities/isValidJSValue.js.flow +1 -1
- package/{module/utilities/isValidJSValue.js → utilities/isValidJSValue.mjs} +1 -1
- package/utilities/isValidLiteralValue.js +8 -4
- package/utilities/isValidLiteralValue.js.flow +4 -4
- package/{module/utilities/isValidLiteralValue.js → utilities/isValidLiteralValue.mjs} +4 -4
- package/utilities/lexicographicSortSchema.js +243 -0
- package/utilities/lexicographicSortSchema.js.flow +198 -0
- package/utilities/lexicographicSortSchema.mjs +225 -0
- package/utilities/schemaPrinter.js +31 -29
- package/utilities/schemaPrinter.js.flow +28 -15
- package/{module/utilities/schemaPrinter.js → utilities/schemaPrinter.mjs} +21 -20
- package/utilities/separateOperations.js +1 -1
- package/utilities/separateOperations.js.flow +1 -1
- package/{module/utilities/separateOperations.js → utilities/separateOperations.mjs} +1 -1
- package/utilities/typeComparators.js +7 -10
- package/utilities/typeComparators.js.flow +7 -10
- package/{module/utilities/typeComparators.js → utilities/typeComparators.mjs} +7 -10
- package/utilities/typeFromAST.js +7 -11
- package/utilities/typeFromAST.js.flow +3 -3
- package/{module/utilities/typeFromAST.js → utilities/typeFromAST.mjs} +3 -3
- package/utilities/valueFromAST.js +26 -28
- package/utilities/valueFromAST.js.flow +14 -23
- package/{module/utilities/valueFromAST.js → utilities/valueFromAST.mjs} +9 -10
- package/utilities/valueFromASTUntyped.js +17 -22
- package/utilities/valueFromASTUntyped.js.flow +6 -7
- package/{module/utilities/valueFromASTUntyped.js → utilities/valueFromASTUntyped.mjs} +6 -7
- package/validation/ValidationContext.js +184 -0
- package/{module/validation/validate.js.flow → validation/ValidationContext.js.flow} +4 -60
- package/{module/validation/validate.js → validation/ValidationContext.mjs} +15 -57
- package/validation/index.js +12 -7
- package/validation/index.js.flow +6 -2
- package/{module/validation/index.js → validation/index.mjs} +6 -2
- package/validation/rules/ExecutableDefinitions.js +3 -3
- package/validation/rules/ExecutableDefinitions.js.flow +6 -10
- package/{module/validation/rules/ExecutableDefinitions.js → validation/rules/ExecutableDefinitions.mjs} +4 -4
- package/validation/rules/FieldsOnCorrectType.js +1 -1
- package/validation/rules/FieldsOnCorrectType.js.flow +2 -2
- package/{module/validation/rules/FieldsOnCorrectType.js → validation/rules/FieldsOnCorrectType.mjs} +1 -1
- package/validation/rules/FragmentsOnCompositeTypes.js +1 -1
- package/validation/rules/FragmentsOnCompositeTypes.js.flow +2 -2
- package/{module/validation/rules/FragmentsOnCompositeTypes.js → validation/rules/FragmentsOnCompositeTypes.mjs} +1 -1
- package/validation/rules/KnownArgumentNames.js +3 -3
- package/validation/rules/KnownArgumentNames.js.flow +6 -8
- package/{module/validation/rules/KnownArgumentNames.js → validation/rules/KnownArgumentNames.mjs} +4 -4
- package/validation/rules/KnownDirectives.js +23 -27
- package/validation/rules/KnownDirectives.js.flow +3 -3
- package/{module/validation/rules/KnownDirectives.js → validation/rules/KnownDirectives.mjs} +2 -2
- package/validation/rules/KnownFragmentNames.js +1 -1
- package/validation/rules/KnownFragmentNames.js.flow +2 -2
- package/{module/validation/rules/KnownFragmentNames.js → validation/rules/KnownFragmentNames.mjs} +1 -1
- package/validation/rules/KnownTypeNames.js +1 -1
- package/validation/rules/KnownTypeNames.js.flow +2 -2
- package/{module/validation/rules/KnownTypeNames.js → validation/rules/KnownTypeNames.mjs} +1 -1
- package/validation/rules/LoneAnonymousOperation.js +2 -2
- package/validation/rules/LoneAnonymousOperation.js.flow +4 -4
- package/{module/validation/rules/LoneAnonymousOperation.js → validation/rules/LoneAnonymousOperation.mjs} +3 -3
- package/validation/rules/NoFragmentCycles.js +1 -1
- package/validation/rules/NoFragmentCycles.js.flow +2 -2
- package/{module/validation/rules/NoFragmentCycles.js → validation/rules/NoFragmentCycles.mjs} +1 -1
- package/validation/rules/NoUndefinedVariables.js +1 -1
- package/validation/rules/NoUndefinedVariables.js.flow +2 -2
- package/{module/validation/rules/NoUndefinedVariables.js → validation/rules/NoUndefinedVariables.mjs} +1 -1
- package/validation/rules/NoUnusedFragments.js +1 -1
- package/validation/rules/NoUnusedFragments.js.flow +2 -2
- package/{module/validation/rules/NoUnusedFragments.js → validation/rules/NoUnusedFragments.mjs} +1 -1
- package/validation/rules/NoUnusedVariables.js +1 -1
- package/validation/rules/NoUnusedVariables.js.flow +2 -2
- package/{module/validation/rules/NoUnusedVariables.js → validation/rules/NoUnusedVariables.mjs} +1 -1
- package/validation/rules/OverlappingFieldsCanBeMerged.js +4 -8
- package/validation/rules/OverlappingFieldsCanBeMerged.js.flow +3 -3
- package/{module/validation/rules/OverlappingFieldsCanBeMerged.js → validation/rules/OverlappingFieldsCanBeMerged.mjs} +2 -2
- package/validation/rules/PossibleFragmentSpreads.js +1 -1
- package/validation/rules/PossibleFragmentSpreads.js.flow +2 -2
- package/{module/validation/rules/PossibleFragmentSpreads.js → validation/rules/PossibleFragmentSpreads.mjs} +1 -1
- package/validation/rules/ProvidedNonNullArguments.js +1 -1
- package/validation/rules/ProvidedNonNullArguments.js.flow +2 -2
- package/{module/validation/rules/ProvidedNonNullArguments.js → validation/rules/ProvidedNonNullArguments.mjs} +1 -1
- package/validation/rules/ScalarLeafs.js +1 -1
- package/validation/rules/ScalarLeafs.js.flow +2 -2
- package/{module/validation/rules/ScalarLeafs.js → validation/rules/ScalarLeafs.mjs} +1 -1
- package/validation/rules/SingleFieldSubscriptions.js +1 -1
- package/validation/rules/SingleFieldSubscriptions.js.flow +2 -2
- package/{module/validation/rules/SingleFieldSubscriptions.js → validation/rules/SingleFieldSubscriptions.mjs} +1 -1
- package/validation/rules/UniqueArgumentNames.js +1 -1
- package/validation/rules/UniqueArgumentNames.js.flow +2 -2
- package/{module/validation/rules/UniqueArgumentNames.js → validation/rules/UniqueArgumentNames.mjs} +1 -1
- package/validation/rules/UniqueDirectivesPerLocation.js +1 -1
- package/validation/rules/UniqueDirectivesPerLocation.js.flow +2 -2
- package/{module/validation/rules/UniqueDirectivesPerLocation.js → validation/rules/UniqueDirectivesPerLocation.mjs} +1 -1
- package/validation/rules/UniqueFragmentNames.js +1 -1
- package/validation/rules/UniqueFragmentNames.js.flow +2 -2
- package/{module/validation/rules/UniqueFragmentNames.js → validation/rules/UniqueFragmentNames.mjs} +1 -1
- package/validation/rules/UniqueInputFieldNames.js +1 -1
- package/validation/rules/UniqueInputFieldNames.js.flow +2 -2
- package/{module/validation/rules/UniqueInputFieldNames.js → validation/rules/UniqueInputFieldNames.mjs} +1 -1
- package/validation/rules/UniqueOperationNames.js +1 -1
- package/validation/rules/UniqueOperationNames.js.flow +2 -2
- package/{module/validation/rules/UniqueOperationNames.js → validation/rules/UniqueOperationNames.mjs} +1 -1
- package/validation/rules/UniqueVariableNames.js +1 -1
- package/validation/rules/UniqueVariableNames.js.flow +2 -2
- package/{module/validation/rules/UniqueVariableNames.js → validation/rules/UniqueVariableNames.mjs} +1 -1
- package/validation/rules/ValuesOfCorrectType.js +1 -1
- package/validation/rules/ValuesOfCorrectType.js.flow +2 -2
- package/{module/validation/rules/ValuesOfCorrectType.js → validation/rules/ValuesOfCorrectType.mjs} +1 -1
- package/validation/rules/VariablesAreInputTypes.js +1 -1
- package/validation/rules/VariablesAreInputTypes.js.flow +2 -2
- package/{module/validation/rules/VariablesAreInputTypes.js → validation/rules/VariablesAreInputTypes.mjs} +1 -1
- package/validation/rules/VariablesDefaultValueAllowed.js +1 -1
- package/validation/rules/VariablesDefaultValueAllowed.js.flow +2 -2
- package/{module/validation/rules/VariablesDefaultValueAllowed.js → validation/rules/VariablesDefaultValueAllowed.mjs} +1 -1
- package/validation/rules/VariablesInAllowedPosition.js +9 -11
- package/validation/rules/VariablesInAllowedPosition.js.flow +3 -4
- package/{module/validation/rules/VariablesInAllowedPosition.js → validation/rules/VariablesInAllowedPosition.mjs} +2 -3
- package/validation/specifiedRules.js +1 -1
- package/validation/specifiedRules.js.flow +2 -2
- package/{module/validation/specifiedRules.js → validation/specifiedRules.mjs} +1 -1
- package/validation/validate.js +14 -175
- package/validation/validate.js.flow +3 -209
- package/validation/validate.mjs +57 -0
- package/module/error/GraphQLError.js.flow +0 -209
- package/module/error/formatError.js.flow +0 -34
- package/module/error/index.js.flow +0 -16
- package/module/error/locatedError.js.flow +0 -37
- package/module/error/printError.js.flow +0 -82
- package/module/error/syntaxError.js.flow +0 -25
- package/module/execution/execute.js.flow +0 -1375
- package/module/execution/index.js.flow +0 -13
- package/module/execution/values.js.flow +0 -206
- package/module/graphql.js.flow +0 -202
- package/module/index.js.flow +0 -389
- package/module/jsutils/dedent.js +0 -45
- package/module/jsutils/dedent.js.flow +0 -49
- package/module/jsutils/find.js.flow +0 -19
- package/module/jsutils/instanceOf.js +0 -27
- package/module/jsutils/instanceOf.js.flow +0 -44
- package/module/jsutils/invariant.js.flow +0 -15
- package/module/jsutils/isInvalid.js.flow +0 -15
- package/module/jsutils/isNullish.js.flow +0 -15
- package/module/jsutils/keyMap.js.flow +0 -43
- package/module/jsutils/keyValMap.js.flow +0 -38
- package/module/jsutils/orList.js.flow +0 -24
- package/module/jsutils/quotedOrList.js.flow +0 -17
- package/module/jsutils/suggestionList.js.flow +0 -94
- package/module/language/ast.js.flow +0 -594
- package/module/language/blockStringValue.js.flow +0 -64
- package/module/language/directiveLocation.js.flow +0 -39
- package/module/language/index.js.flow +0 -84
- package/module/language/kinds.js +0 -80
- package/module/language/kinds.js.flow +0 -80
- package/module/language/lexer.js.flow +0 -762
- package/module/language/location.js.flow +0 -34
- package/module/language/parser.js.flow +0 -1537
- package/module/language/printer.js.flow +0 -311
- package/module/language/source.js.flow +0 -43
- package/module/language/visitor.js.flow +0 -476
- package/module/subscription/asyncIteratorReject.js.flow +0 -41
- package/module/subscription/index.js.flow +0 -10
- package/module/subscription/mapAsyncIterator.js.flow +0 -78
- package/module/subscription/subscribe.js.flow +0 -288
- package/module/type/definition.js.flow +0 -1225
- package/module/type/directives.js.flow +0 -168
- package/module/type/index.js.flow +0 -156
- package/module/type/introspection.js.flow +0 -482
- package/module/type/scalars.js.flow +0 -158
- package/module/type/schema.js.flow +0 -271
- package/module/type/validate.js.flow +0 -723
- package/module/type/wrappers.js +0 -80
- package/module/type/wrappers.js.flow +0 -91
- package/module/utilities/TypeInfo.js.flow +0 -296
- package/module/utilities/assertValidName.js.flow +0 -56
- package/module/utilities/astFromValue.js.flow +0 -159
- package/module/utilities/buildASTSchema.js.flow +0 -518
- package/module/utilities/buildClientSchema.js.flow +0 -418
- package/module/utilities/coerceValue.js.flow +0 -257
- package/module/utilities/concatAST.js.flow +0 -29
- package/module/utilities/extendSchema.js.flow +0 -374
- package/module/utilities/findBreakingChanges.js.flow +0 -851
- package/module/utilities/findDeprecatedUsages.js.flow +0 -68
- package/module/utilities/getOperationAST.js.flow +0 -40
- package/module/utilities/index.js.flow +0 -111
- package/module/utilities/introspectionQuery.js.flow +0 -271
- package/module/utilities/isValidJSValue.js.flow +0 -22
- package/module/utilities/isValidLiteralValue.js.flow +0 -36
- package/module/utilities/schemaPrinter.js.flow +0 -402
- package/module/utilities/separateOperations.js.flow +0 -100
- package/module/utilities/typeComparators.js.flow +0 -135
- package/module/utilities/typeFromAST.js.flow +0 -56
- package/module/utilities/valueFromAST.js.flow +0 -184
- package/module/utilities/valueFromASTUntyped.js.flow +0 -64
- package/module/validation/index.js.flow +0 -138
- package/module/validation/rules/ExecutableDefinitions.js.flow +0 -52
- package/module/validation/rules/FieldsOnCorrectType.js.flow +0 -144
- package/module/validation/rules/FragmentsOnCompositeTypes.js.flow +0 -74
- package/module/validation/rules/KnownArgumentNames.js.flow +0 -98
- package/module/validation/rules/KnownDirectives.js.flow +0 -116
- package/module/validation/rules/KnownFragmentNames.js.flow +0 -36
- package/module/validation/rules/KnownTypeNames.js.flow +0 -59
- package/module/validation/rules/LoneAnonymousOperation.js.flow +0 -41
- package/module/validation/rules/NoFragmentCycles.js.flow +0 -85
- package/module/validation/rules/NoUndefinedVariables.js.flow +0 -57
- package/module/validation/rules/NoUnusedFragments.js.flow +0 -59
- package/module/validation/rules/NoUnusedVariables.js.flow +0 -62
- package/module/validation/rules/OverlappingFieldsCanBeMerged.js.flow +0 -847
- package/module/validation/rules/PossibleFragmentSpreads.js.flow +0 -94
- package/module/validation/rules/ProvidedNonNullArguments.js.flow +0 -105
- package/module/validation/rules/ScalarLeafs.js.flow +0 -69
- package/module/validation/rules/SingleFieldSubscriptions.js.flow +0 -44
- package/module/validation/rules/UniqueArgumentNames.js.flow +0 -48
- package/module/validation/rules/UniqueDirectivesPerLocation.js.flow +0 -57
- package/module/validation/rules/UniqueFragmentNames.js.flow +0 -42
- package/module/validation/rules/UniqueInputFieldNames.js.flow +0 -53
- package/module/validation/rules/UniqueOperationNames.js.flow +0 -44
- package/module/validation/rules/UniqueVariableNames.js.flow +0 -44
- package/module/validation/rules/ValuesOfCorrectType.js.flow +0 -218
- package/module/validation/rules/VariablesAreInputTypes.js.flow +0 -48
- package/module/validation/rules/VariablesDefaultValueAllowed.js.flow +0 -55
- package/module/validation/rules/VariablesInAllowedPosition.js.flow +0 -83
- package/module/validation/specifiedRules.js.flow +0 -127
- package/type/wrappers.js +0 -89
- package/type/wrappers.js.flow +0 -91
package/{module/validation/rules/KnownArgumentNames.js → validation/rules/KnownArgumentNames.mjs}
RENAMED
|
@@ -5,12 +5,12 @@ import { GraphQLError } from '../../error'; /**
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import suggestionList from '../../jsutils/suggestionList';
|
|
12
12
|
import quotedOrList from '../../jsutils/quotedOrList';
|
|
13
|
-
import {
|
|
13
|
+
import { Kind } from '../../language/kinds';
|
|
14
14
|
|
|
15
15
|
export function unknownArgMessage(argName, fieldName, typeName, suggestedArgs) {
|
|
16
16
|
var message = 'Unknown argument "' + argName + '" on field "' + fieldName + '" of ' + ('type "' + typeName + '".');
|
|
@@ -40,7 +40,7 @@ export function KnownArgumentNames(context) {
|
|
|
40
40
|
var argDef = context.getArgument();
|
|
41
41
|
if (!argDef) {
|
|
42
42
|
var argumentOf = ancestors[ancestors.length - 1];
|
|
43
|
-
if (argumentOf.kind === FIELD) {
|
|
43
|
+
if (argumentOf.kind === Kind.FIELD) {
|
|
44
44
|
var fieldDef = context.getFieldDef();
|
|
45
45
|
var parentType = context.getParentType();
|
|
46
46
|
if (fieldDef && parentType) {
|
|
@@ -48,7 +48,7 @@ export function KnownArgumentNames(context) {
|
|
|
48
48
|
return arg.name;
|
|
49
49
|
}))), [node]));
|
|
50
50
|
}
|
|
51
|
-
} else if (argumentOf.kind === DIRECTIVE) {
|
|
51
|
+
} else if (argumentOf.kind === Kind.DIRECTIVE) {
|
|
52
52
|
var directive = context.getDirective();
|
|
53
53
|
if (directive) {
|
|
54
54
|
context.reportError(new GraphQLError(unknownDirectiveArgMessage(node.name.value, directive.name, suggestionList(node.name.value, directive.args.map(function (arg) {
|
|
@@ -15,12 +15,8 @@ var _find2 = _interopRequireDefault(_find);
|
|
|
15
15
|
|
|
16
16
|
var _kinds = require('../../language/kinds');
|
|
17
17
|
|
|
18
|
-
var Kind = _interopRequireWildcard(_kinds);
|
|
19
|
-
|
|
20
18
|
var _directiveLocation = require('../../language/directiveLocation');
|
|
21
19
|
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
23
|
-
|
|
24
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
21
|
|
|
26
22
|
function unknownDirectiveMessage(directiveName) {
|
|
@@ -31,7 +27,7 @@ function unknownDirectiveMessage(directiveName) {
|
|
|
31
27
|
* This source code is licensed under the MIT license found in the
|
|
32
28
|
* LICENSE file in the root directory of this source tree.
|
|
33
29
|
*
|
|
34
|
-
*
|
|
30
|
+
* strict
|
|
35
31
|
*/
|
|
36
32
|
|
|
37
33
|
function misplacedDirectiveMessage(directiveName, location) {
|
|
@@ -66,7 +62,7 @@ function getDirectiveLocationForASTPath(ancestors) {
|
|
|
66
62
|
var appliedTo = ancestors[ancestors.length - 1];
|
|
67
63
|
if (!Array.isArray(appliedTo)) {
|
|
68
64
|
switch (appliedTo.kind) {
|
|
69
|
-
case Kind.OPERATION_DEFINITION:
|
|
65
|
+
case _kinds.Kind.OPERATION_DEFINITION:
|
|
70
66
|
switch (appliedTo.operation) {
|
|
71
67
|
case 'query':
|
|
72
68
|
return _directiveLocation.DirectiveLocation.QUERY;
|
|
@@ -76,41 +72,41 @@ function getDirectiveLocationForASTPath(ancestors) {
|
|
|
76
72
|
return _directiveLocation.DirectiveLocation.SUBSCRIPTION;
|
|
77
73
|
}
|
|
78
74
|
break;
|
|
79
|
-
case Kind.FIELD:
|
|
75
|
+
case _kinds.Kind.FIELD:
|
|
80
76
|
return _directiveLocation.DirectiveLocation.FIELD;
|
|
81
|
-
case Kind.FRAGMENT_SPREAD:
|
|
77
|
+
case _kinds.Kind.FRAGMENT_SPREAD:
|
|
82
78
|
return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD;
|
|
83
|
-
case Kind.INLINE_FRAGMENT:
|
|
79
|
+
case _kinds.Kind.INLINE_FRAGMENT:
|
|
84
80
|
return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT;
|
|
85
|
-
case Kind.FRAGMENT_DEFINITION:
|
|
81
|
+
case _kinds.Kind.FRAGMENT_DEFINITION:
|
|
86
82
|
return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION;
|
|
87
|
-
case Kind.SCHEMA_DEFINITION:
|
|
83
|
+
case _kinds.Kind.SCHEMA_DEFINITION:
|
|
88
84
|
return _directiveLocation.DirectiveLocation.SCHEMA;
|
|
89
|
-
case Kind.SCALAR_TYPE_DEFINITION:
|
|
90
|
-
case Kind.SCALAR_TYPE_EXTENSION:
|
|
85
|
+
case _kinds.Kind.SCALAR_TYPE_DEFINITION:
|
|
86
|
+
case _kinds.Kind.SCALAR_TYPE_EXTENSION:
|
|
91
87
|
return _directiveLocation.DirectiveLocation.SCALAR;
|
|
92
|
-
case Kind.OBJECT_TYPE_DEFINITION:
|
|
93
|
-
case Kind.OBJECT_TYPE_EXTENSION:
|
|
88
|
+
case _kinds.Kind.OBJECT_TYPE_DEFINITION:
|
|
89
|
+
case _kinds.Kind.OBJECT_TYPE_EXTENSION:
|
|
94
90
|
return _directiveLocation.DirectiveLocation.OBJECT;
|
|
95
|
-
case Kind.FIELD_DEFINITION:
|
|
91
|
+
case _kinds.Kind.FIELD_DEFINITION:
|
|
96
92
|
return _directiveLocation.DirectiveLocation.FIELD_DEFINITION;
|
|
97
|
-
case Kind.INTERFACE_TYPE_DEFINITION:
|
|
98
|
-
case Kind.INTERFACE_TYPE_EXTENSION:
|
|
93
|
+
case _kinds.Kind.INTERFACE_TYPE_DEFINITION:
|
|
94
|
+
case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
|
|
99
95
|
return _directiveLocation.DirectiveLocation.INTERFACE;
|
|
100
|
-
case Kind.UNION_TYPE_DEFINITION:
|
|
101
|
-
case Kind.UNION_TYPE_EXTENSION:
|
|
96
|
+
case _kinds.Kind.UNION_TYPE_DEFINITION:
|
|
97
|
+
case _kinds.Kind.UNION_TYPE_EXTENSION:
|
|
102
98
|
return _directiveLocation.DirectiveLocation.UNION;
|
|
103
|
-
case Kind.ENUM_TYPE_DEFINITION:
|
|
104
|
-
case Kind.ENUM_TYPE_EXTENSION:
|
|
99
|
+
case _kinds.Kind.ENUM_TYPE_DEFINITION:
|
|
100
|
+
case _kinds.Kind.ENUM_TYPE_EXTENSION:
|
|
105
101
|
return _directiveLocation.DirectiveLocation.ENUM;
|
|
106
|
-
case Kind.ENUM_VALUE_DEFINITION:
|
|
102
|
+
case _kinds.Kind.ENUM_VALUE_DEFINITION:
|
|
107
103
|
return _directiveLocation.DirectiveLocation.ENUM_VALUE;
|
|
108
|
-
case Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
109
|
-
case Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
104
|
+
case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
105
|
+
case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
110
106
|
return _directiveLocation.DirectiveLocation.INPUT_OBJECT;
|
|
111
|
-
case Kind.INPUT_VALUE_DEFINITION:
|
|
107
|
+
case _kinds.Kind.INPUT_VALUE_DEFINITION:
|
|
112
108
|
var parentNode = ancestors[ancestors.length - 3];
|
|
113
|
-
return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
|
|
109
|
+
return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import find from '../../jsutils/find';
|
|
13
|
-
import
|
|
13
|
+
import { Kind } from '../../language/kinds';
|
|
14
14
|
import { DirectiveLocation } from '../../language/directiveLocation';
|
|
15
15
|
import type { ASTVisitor } from '../../language/visitor';
|
|
16
16
|
|
|
@@ -5,11 +5,11 @@ import { GraphQLError } from '../../error'; /**
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import find from '../../jsutils/find';
|
|
12
|
-
import
|
|
12
|
+
import { Kind } from '../../language/kinds';
|
|
13
13
|
import { DirectiveLocation } from '../../language/directiveLocation';
|
|
14
14
|
|
|
15
15
|
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { ASTVisitor } from '../../language/visitor';
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
27
|
+
* strict
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
function unknownTypeMessage(typeName, suggestedTypes) {
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import suggestionList from '../../jsutils/suggestionList';
|
|
13
13
|
import quotedOrList from '../../jsutils/quotedOrList';
|
|
@@ -26,7 +26,7 @@ function anonOperationNotAloneMessage() {
|
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* strict
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
function LoneAnonymousOperation(context) {
|
|
@@ -34,7 +34,7 @@ function LoneAnonymousOperation(context) {
|
|
|
34
34
|
return {
|
|
35
35
|
Document: function Document(node) {
|
|
36
36
|
operationCount = node.definitions.filter(function (definition) {
|
|
37
|
-
return definition.kind === _kinds.OPERATION_DEFINITION;
|
|
37
|
+
return definition.kind === _kinds.Kind.OPERATION_DEFINITION;
|
|
38
38
|
}).length;
|
|
39
39
|
},
|
|
40
40
|
OperationDefinition: function OperationDefinition(node) {
|
|
@@ -4,12 +4,12 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
|
-
import {
|
|
12
|
+
import { Kind } from '../../language/kinds';
|
|
13
13
|
import type { ASTVisitor } from '../../language/visitor';
|
|
14
14
|
|
|
15
15
|
export function anonOperationNotAloneMessage(): string {
|
|
@@ -27,7 +27,7 @@ export function LoneAnonymousOperation(context: ValidationContext): ASTVisitor {
|
|
|
27
27
|
return {
|
|
28
28
|
Document(node) {
|
|
29
29
|
operationCount = node.definitions.filter(
|
|
30
|
-
definition => definition.kind === OPERATION_DEFINITION,
|
|
30
|
+
definition => definition.kind === Kind.OPERATION_DEFINITION,
|
|
31
31
|
).length;
|
|
32
32
|
},
|
|
33
33
|
OperationDefinition(node) {
|
|
@@ -5,10 +5,10 @@ import { GraphQLError } from '../../error'; /**
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { Kind } from '../../language/kinds';
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
export function anonOperationNotAloneMessage() {
|
|
@@ -26,7 +26,7 @@ export function LoneAnonymousOperation(context) {
|
|
|
26
26
|
return {
|
|
27
27
|
Document: function Document(node) {
|
|
28
28
|
operationCount = node.definitions.filter(function (definition) {
|
|
29
|
-
return definition.kind === OPERATION_DEFINITION;
|
|
29
|
+
return definition.kind === Kind.OPERATION_DEFINITION;
|
|
30
30
|
}).length;
|
|
31
31
|
},
|
|
32
32
|
OperationDefinition: function OperationDefinition(node) {
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { FragmentDefinitionNode } from '../../language/ast';
|
|
13
13
|
import type { ASTVisitor } from '../../language/visitor';
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { ASTVisitor } from '../../language/visitor';
|
|
13
13
|
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { ASTVisitor } from '../../language/visitor';
|
|
13
13
|
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { ASTVisitor } from '../../language/visitor';
|
|
13
13
|
|
|
@@ -14,16 +14,12 @@ var _find2 = _interopRequireDefault(_find);
|
|
|
14
14
|
|
|
15
15
|
var _kinds = require('../../language/kinds');
|
|
16
16
|
|
|
17
|
-
var Kind = _interopRequireWildcard(_kinds);
|
|
18
|
-
|
|
19
17
|
var _printer = require('../../language/printer');
|
|
20
18
|
|
|
21
19
|
var _definition = require('../../type/definition');
|
|
22
20
|
|
|
23
21
|
var _typeFromAST = require('../../utilities/typeFromAST');
|
|
24
22
|
|
|
25
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
26
|
-
|
|
27
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
24
|
|
|
29
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
|
|
@@ -32,7 +28,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
32
28
|
* This source code is licensed under the MIT license found in the
|
|
33
29
|
* LICENSE file in the root directory of this source tree.
|
|
34
30
|
*
|
|
35
|
-
*
|
|
31
|
+
* strict
|
|
36
32
|
*/
|
|
37
33
|
|
|
38
34
|
function fieldsConflictMessage(responseName, reason) {
|
|
@@ -490,7 +486,7 @@ function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeA
|
|
|
490
486
|
for (var i = 0; i < selectionSet.selections.length; i++) {
|
|
491
487
|
var selection = selectionSet.selections[i];
|
|
492
488
|
switch (selection.kind) {
|
|
493
|
-
case Kind.FIELD:
|
|
489
|
+
case _kinds.Kind.FIELD:
|
|
494
490
|
var fieldName = selection.name.value;
|
|
495
491
|
var fieldDef = void 0;
|
|
496
492
|
if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
|
|
@@ -502,10 +498,10 @@ function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeA
|
|
|
502
498
|
}
|
|
503
499
|
nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
|
|
504
500
|
break;
|
|
505
|
-
case Kind.FRAGMENT_SPREAD:
|
|
501
|
+
case _kinds.Kind.FRAGMENT_SPREAD:
|
|
506
502
|
fragmentNames[selection.name.value] = true;
|
|
507
503
|
break;
|
|
508
|
-
case Kind.INLINE_FRAGMENT:
|
|
504
|
+
case _kinds.Kind.INLINE_FRAGMENT:
|
|
509
505
|
var typeCondition = selection.typeCondition;
|
|
510
506
|
var inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType;
|
|
511
507
|
_collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import find from '../../jsutils/find';
|
|
13
13
|
import type { ObjMap } from '../../jsutils/ObjMap';
|
|
@@ -17,7 +17,7 @@ import type {
|
|
|
17
17
|
ArgumentNode,
|
|
18
18
|
FragmentDefinitionNode,
|
|
19
19
|
} from '../../language/ast';
|
|
20
|
-
import
|
|
20
|
+
import { Kind } from '../../language/kinds';
|
|
21
21
|
import { print } from '../../language/printer';
|
|
22
22
|
import type { ASTVisitor } from '../../language/visitor';
|
|
23
23
|
import {
|
|
@@ -6,12 +6,12 @@ import { GraphQLError } from '../../error'; /**
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* strict
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import find from '../../jsutils/find';
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import { Kind } from '../../language/kinds';
|
|
15
15
|
import { print } from '../../language/printer';
|
|
16
16
|
|
|
17
17
|
import { getNamedType, isNonNullType, isLeafType, isObjectType, isListType, isInterfaceType } from '../../type/definition';
|
|
@@ -23,7 +23,7 @@ function typeIncompatibleSpreadMessage(fragName, parentType, fragType) {
|
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
26
|
+
* strict
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
function typeIncompatibleAnonSpreadMessage(parentType, fragType) {
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { ASTVisitor } from '../../language/visitor';
|
|
13
13
|
import { doTypesOverlap } from '../../utilities/typeComparators';
|
|
@@ -5,7 +5,7 @@ import { GraphQLError } from '../../error'; /**
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { doTypesOverlap } from '../../utilities/typeComparators';
|
|
@@ -23,7 +23,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
26
|
+
* strict
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
function missingFieldArgMessage(fieldName, argName, type) {
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import keyMap from '../../jsutils/keyMap';
|
|
13
13
|
import { isNonNullType } from '../../type/definition';
|
|
@@ -19,7 +19,7 @@ function noSubselectionAllowedMessage(fieldName, type) {
|
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* strict
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
function requiredSubselectionMessage(fieldName, type) {
|
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import type ValidationContext from '../ValidationContext';
|
|
11
11
|
import { GraphQLError } from '../../error';
|
|
12
12
|
import type { FieldNode } from '../../language/ast';
|
|
13
13
|
import { getNamedType, isLeafType } from '../../type/definition';
|
|
@@ -5,7 +5,7 @@ import { GraphQLError } from '../../error'; /**
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { getNamedType, isLeafType } from '../../type/definition';
|