@contember/graphql-json 0.0.0-stage → 2.2.0-alpha.21
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/README.md +119 -2
- package/dist/development/index.cjs +123 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +123 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/execution/collectFields.cjs +138 -0
- package/dist/development/src/execution/collectFields.cjs.map +1 -0
- package/dist/development/src/execution/collectFields.js +138 -0
- package/dist/development/src/execution/collectFields.js.map +1 -0
- package/dist/development/src/execution/complete.cjs +340 -0
- package/dist/development/src/execution/complete.cjs.map +1 -0
- package/dist/development/src/execution/complete.js +340 -0
- package/dist/development/src/execution/complete.js.map +1 -0
- package/dist/development/src/execution/context.cjs +93 -0
- package/dist/development/src/execution/context.cjs.map +1 -0
- package/dist/development/src/execution/context.js +93 -0
- package/dist/development/src/execution/context.js.map +1 -0
- package/dist/development/src/execution/directives.cjs +49 -0
- package/dist/development/src/execution/directives.cjs.map +1 -0
- package/dist/development/src/execution/directives.js +49 -0
- package/dist/development/src/execution/directives.js.map +1 -0
- package/dist/development/src/execution/execute.cjs +128 -0
- package/dist/development/src/execution/execute.cjs.map +1 -0
- package/dist/development/src/execution/execute.js +128 -0
- package/dist/development/src/execution/execute.js.map +1 -0
- package/dist/development/src/execution/fields.cjs +156 -0
- package/dist/development/src/execution/fields.cjs.map +1 -0
- package/dist/development/src/execution/fields.js +156 -0
- package/dist/development/src/execution/fields.js.map +1 -0
- package/dist/development/src/execution/introspectionResolvers.cjs +85 -0
- package/dist/development/src/execution/introspectionResolvers.cjs.map +1 -0
- package/dist/development/src/execution/introspectionResolvers.js +86 -0
- package/dist/development/src/execution/introspectionResolvers.js.map +1 -0
- package/dist/development/src/execution/values.cjs +371 -0
- package/dist/development/src/execution/values.cjs.map +1 -0
- package/dist/development/src/execution/values.js +371 -0
- package/dist/development/src/execution/values.js.map +1 -0
- package/dist/development/src/introspection/resolvers.cjs +432 -0
- package/dist/development/src/introspection/resolvers.cjs.map +1 -0
- package/dist/development/src/introspection/resolvers.js +432 -0
- package/dist/development/src/introspection/resolvers.js.map +1 -0
- package/dist/development/src/introspection/types.cjs +267 -0
- package/dist/development/src/introspection/types.cjs.map +1 -0
- package/dist/development/src/introspection/types.js +267 -0
- package/dist/development/src/introspection/types.js.map +1 -0
- package/dist/development/src/scalars/builtIn.cjs +260 -0
- package/dist/development/src/scalars/builtIn.cjs.map +1 -0
- package/dist/development/src/scalars/builtIn.js +260 -0
- package/dist/development/src/scalars/builtIn.js.map +1 -0
- package/dist/development/src/schema/buildSchema.cjs +235 -0
- package/dist/development/src/schema/buildSchema.cjs.map +1 -0
- package/dist/development/src/schema/buildSchema.js +235 -0
- package/dist/development/src/schema/buildSchema.js.map +1 -0
- package/dist/development/src/types/resolvers.cjs +15 -0
- package/dist/development/src/types/resolvers.cjs.map +1 -0
- package/dist/development/src/types/resolvers.js +15 -0
- package/dist/development/src/types/resolvers.js.map +1 -0
- package/dist/development/src/types/schema.cjs +184 -0
- package/dist/development/src/types/schema.cjs.map +1 -0
- package/dist/development/src/types/schema.js +184 -0
- package/dist/development/src/types/schema.js.map +1 -0
- package/dist/development/src/utils/enumValues.cjs +49 -0
- package/dist/development/src/utils/enumValues.cjs.map +1 -0
- package/dist/development/src/utils/enumValues.js +49 -0
- package/dist/development/src/utils/enumValues.js.map +1 -0
- package/dist/development/src/utils/helpers.cjs +122 -0
- package/dist/development/src/utils/helpers.cjs.map +1 -0
- package/dist/development/src/utils/helpers.js +122 -0
- package/dist/development/src/utils/helpers.js.map +1 -0
- package/dist/development/src/utils/path.cjs +17 -0
- package/dist/development/src/utils/path.cjs.map +1 -0
- package/dist/development/src/utils/path.js +17 -0
- package/dist/development/src/utils/path.js.map +1 -0
- package/dist/development/src/utils/schemaInterner.cjs +297 -0
- package/dist/development/src/utils/schemaInterner.cjs.map +1 -0
- package/dist/development/src/utils/schemaInterner.js +297 -0
- package/dist/development/src/utils/schemaInterner.js.map +1 -0
- package/dist/development/src/utils/toGraphQLJsSchema.cjs +130 -0
- package/dist/development/src/utils/toGraphQLJsSchema.cjs.map +1 -0
- package/dist/development/src/utils/toGraphQLJsSchema.js +130 -0
- package/dist/development/src/utils/toGraphQLJsSchema.js.map +1 -0
- package/dist/development/src/utils/typeRef.cjs +246 -0
- package/dist/development/src/utils/typeRef.cjs.map +1 -0
- package/dist/development/src/utils/typeRef.js +246 -0
- package/dist/development/src/utils/typeRef.js.map +1 -0
- package/dist/development/src/validation/TypeInfo.cjs +309 -0
- package/dist/development/src/validation/TypeInfo.cjs.map +1 -0
- package/dist/development/src/validation/TypeInfo.js +309 -0
- package/dist/development/src/validation/TypeInfo.js.map +1 -0
- package/dist/development/src/validation/ValidationContext.cjs +170 -0
- package/dist/development/src/validation/ValidationContext.cjs.map +1 -0
- package/dist/development/src/validation/ValidationContext.js +170 -0
- package/dist/development/src/validation/ValidationContext.js.map +1 -0
- package/dist/development/src/validation/helpers.cjs +233 -0
- package/dist/development/src/validation/helpers.cjs.map +1 -0
- package/dist/development/src/validation/helpers.js +233 -0
- package/dist/development/src/validation/helpers.js.map +1 -0
- package/dist/development/src/validation/rules/ExecutableDefinitionsRule.cjs +25 -0
- package/dist/development/src/validation/rules/ExecutableDefinitionsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/ExecutableDefinitionsRule.js +25 -0
- package/dist/development/src/validation/rules/ExecutableDefinitionsRule.js.map +1 -0
- package/dist/development/src/validation/rules/FieldsOnCorrectTypeRule.cjs +80 -0
- package/dist/development/src/validation/rules/FieldsOnCorrectTypeRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/FieldsOnCorrectTypeRule.js +80 -0
- package/dist/development/src/validation/rules/FieldsOnCorrectTypeRule.js.map +1 -0
- package/dist/development/src/validation/rules/FragmentsOnCompositeTypesRule.cjs +39 -0
- package/dist/development/src/validation/rules/FragmentsOnCompositeTypesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/FragmentsOnCompositeTypesRule.js +39 -0
- package/dist/development/src/validation/rules/FragmentsOnCompositeTypesRule.js.map +1 -0
- package/dist/development/src/validation/rules/KnownArgumentNamesRule.cjs +62 -0
- package/dist/development/src/validation/rules/KnownArgumentNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/KnownArgumentNamesRule.js +62 -0
- package/dist/development/src/validation/rules/KnownArgumentNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/KnownDirectivesRule.cjs +99 -0
- package/dist/development/src/validation/rules/KnownDirectivesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/KnownDirectivesRule.js +99 -0
- package/dist/development/src/validation/rules/KnownDirectivesRule.js.map +1 -0
- package/dist/development/src/validation/rules/KnownFragmentNamesRule.cjs +18 -0
- package/dist/development/src/validation/rules/KnownFragmentNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/KnownFragmentNamesRule.js +18 -0
- package/dist/development/src/validation/rules/KnownFragmentNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/KnownTypeNamesRule.cjs +36 -0
- package/dist/development/src/validation/rules/KnownTypeNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/KnownTypeNamesRule.js +36 -0
- package/dist/development/src/validation/rules/KnownTypeNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/LoneAnonymousOperationRule.cjs +25 -0
- package/dist/development/src/validation/rules/LoneAnonymousOperationRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/LoneAnonymousOperationRule.js +25 -0
- package/dist/development/src/validation/rules/LoneAnonymousOperationRule.js.map +1 -0
- package/dist/development/src/validation/rules/MaxIntrospectionDepthRule.cjs +51 -0
- package/dist/development/src/validation/rules/MaxIntrospectionDepthRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/MaxIntrospectionDepthRule.js +51 -0
- package/dist/development/src/validation/rules/MaxIntrospectionDepthRule.js.map +1 -0
- package/dist/development/src/validation/rules/NoFragmentCyclesRule.cjs +68 -0
- package/dist/development/src/validation/rules/NoFragmentCyclesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/NoFragmentCyclesRule.js +68 -0
- package/dist/development/src/validation/rules/NoFragmentCyclesRule.js.map +1 -0
- package/dist/development/src/validation/rules/NoUndefinedVariablesRule.cjs +28 -0
- package/dist/development/src/validation/rules/NoUndefinedVariablesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/NoUndefinedVariablesRule.js +28 -0
- package/dist/development/src/validation/rules/NoUndefinedVariablesRule.js.map +1 -0
- package/dist/development/src/validation/rules/NoUnusedFragmentsRule.cjs +39 -0
- package/dist/development/src/validation/rules/NoUnusedFragmentsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/NoUnusedFragmentsRule.js +39 -0
- package/dist/development/src/validation/rules/NoUnusedFragmentsRule.js.map +1 -0
- package/dist/development/src/validation/rules/NoUnusedVariablesRule.cjs +36 -0
- package/dist/development/src/validation/rules/NoUnusedVariablesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/NoUnusedVariablesRule.js +36 -0
- package/dist/development/src/validation/rules/NoUnusedVariablesRule.js.map +1 -0
- package/dist/development/src/validation/rules/OverlappingFieldsCanBeMergedRule.cjs +326 -0
- package/dist/development/src/validation/rules/OverlappingFieldsCanBeMergedRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/OverlappingFieldsCanBeMergedRule.js +326 -0
- package/dist/development/src/validation/rules/OverlappingFieldsCanBeMergedRule.js.map +1 -0
- package/dist/development/src/validation/rules/PossibleFragmentSpreadsRule.cjs +71 -0
- package/dist/development/src/validation/rules/PossibleFragmentSpreadsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/PossibleFragmentSpreadsRule.js +71 -0
- package/dist/development/src/validation/rules/PossibleFragmentSpreadsRule.js.map +1 -0
- package/dist/development/src/validation/rules/ProvidedRequiredArgumentsRule.cjs +88 -0
- package/dist/development/src/validation/rules/ProvidedRequiredArgumentsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/ProvidedRequiredArgumentsRule.js +88 -0
- package/dist/development/src/validation/rules/ProvidedRequiredArgumentsRule.js.map +1 -0
- package/dist/development/src/validation/rules/ScalarLeafsRule.cjs +46 -0
- package/dist/development/src/validation/rules/ScalarLeafsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/ScalarLeafsRule.js +46 -0
- package/dist/development/src/validation/rules/ScalarLeafsRule.js.map +1 -0
- package/dist/development/src/validation/rules/SingleFieldSubscriptionsRule.cjs +51 -0
- package/dist/development/src/validation/rules/SingleFieldSubscriptionsRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/SingleFieldSubscriptionsRule.js +51 -0
- package/dist/development/src/validation/rules/SingleFieldSubscriptionsRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueArgumentNamesRule.cjs +34 -0
- package/dist/development/src/validation/rules/UniqueArgumentNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueArgumentNamesRule.js +34 -0
- package/dist/development/src/validation/rules/UniqueArgumentNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueDirectivesPerLocationRule.cjs +51 -0
- package/dist/development/src/validation/rules/UniqueDirectivesPerLocationRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueDirectivesPerLocationRule.js +51 -0
- package/dist/development/src/validation/rules/UniqueDirectivesPerLocationRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueFragmentNamesRule.cjs +28 -0
- package/dist/development/src/validation/rules/UniqueFragmentNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueFragmentNamesRule.js +28 -0
- package/dist/development/src/validation/rules/UniqueFragmentNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueInputFieldNamesRule.cjs +37 -0
- package/dist/development/src/validation/rules/UniqueInputFieldNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueInputFieldNamesRule.js +37 -0
- package/dist/development/src/validation/rules/UniqueInputFieldNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueOperationNamesRule.cjs +30 -0
- package/dist/development/src/validation/rules/UniqueOperationNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueOperationNamesRule.js +30 -0
- package/dist/development/src/validation/rules/UniqueOperationNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/UniqueVariableNamesRule.cjs +27 -0
- package/dist/development/src/validation/rules/UniqueVariableNamesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/UniqueVariableNamesRule.js +27 -0
- package/dist/development/src/validation/rules/UniqueVariableNamesRule.js.map +1 -0
- package/dist/development/src/validation/rules/ValuesOfCorrectTypeRule.cjs +123 -0
- package/dist/development/src/validation/rules/ValuesOfCorrectTypeRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/ValuesOfCorrectTypeRule.js +123 -0
- package/dist/development/src/validation/rules/ValuesOfCorrectTypeRule.js.map +1 -0
- package/dist/development/src/validation/rules/VariablesAreInputTypesRule.cjs +29 -0
- package/dist/development/src/validation/rules/VariablesAreInputTypesRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/VariablesAreInputTypesRule.js +29 -0
- package/dist/development/src/validation/rules/VariablesAreInputTypesRule.js.map +1 -0
- package/dist/development/src/validation/rules/VariablesInAllowedPositionRule.cjs +63 -0
- package/dist/development/src/validation/rules/VariablesInAllowedPositionRule.cjs.map +1 -0
- package/dist/development/src/validation/rules/VariablesInAllowedPositionRule.js +63 -0
- package/dist/development/src/validation/rules/VariablesInAllowedPositionRule.js.map +1 -0
- package/dist/development/src/validation/sortValueNode.cjs +71 -0
- package/dist/development/src/validation/sortValueNode.cjs.map +1 -0
- package/dist/development/src/validation/sortValueNode.js +71 -0
- package/dist/development/src/validation/sortValueNode.js.map +1 -0
- package/dist/development/src/validation/specifiedRules.cjs +87 -0
- package/dist/development/src/validation/specifiedRules.cjs.map +1 -0
- package/dist/development/src/validation/specifiedRules.js +87 -0
- package/dist/development/src/validation/specifiedRules.js.map +1 -0
- package/dist/development/src/validation/validate.cjs +53 -0
- package/dist/development/src/validation/validate.cjs.map +1 -0
- package/dist/development/src/validation/validate.js +53 -0
- package/dist/development/src/validation/validate.js.map +1 -0
- package/dist/production/index.cjs +123 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +123 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/execution/collectFields.cjs +138 -0
- package/dist/production/src/execution/collectFields.cjs.map +1 -0
- package/dist/production/src/execution/collectFields.js +138 -0
- package/dist/production/src/execution/collectFields.js.map +1 -0
- package/dist/production/src/execution/complete.cjs +340 -0
- package/dist/production/src/execution/complete.cjs.map +1 -0
- package/dist/production/src/execution/complete.js +340 -0
- package/dist/production/src/execution/complete.js.map +1 -0
- package/dist/production/src/execution/context.cjs +93 -0
- package/dist/production/src/execution/context.cjs.map +1 -0
- package/dist/production/src/execution/context.js +93 -0
- package/dist/production/src/execution/context.js.map +1 -0
- package/dist/production/src/execution/directives.cjs +49 -0
- package/dist/production/src/execution/directives.cjs.map +1 -0
- package/dist/production/src/execution/directives.js +49 -0
- package/dist/production/src/execution/directives.js.map +1 -0
- package/dist/production/src/execution/execute.cjs +128 -0
- package/dist/production/src/execution/execute.cjs.map +1 -0
- package/dist/production/src/execution/execute.js +128 -0
- package/dist/production/src/execution/execute.js.map +1 -0
- package/dist/production/src/execution/fields.cjs +156 -0
- package/dist/production/src/execution/fields.cjs.map +1 -0
- package/dist/production/src/execution/fields.js +156 -0
- package/dist/production/src/execution/fields.js.map +1 -0
- package/dist/production/src/execution/introspectionResolvers.cjs +85 -0
- package/dist/production/src/execution/introspectionResolvers.cjs.map +1 -0
- package/dist/production/src/execution/introspectionResolvers.js +86 -0
- package/dist/production/src/execution/introspectionResolvers.js.map +1 -0
- package/dist/production/src/execution/values.cjs +371 -0
- package/dist/production/src/execution/values.cjs.map +1 -0
- package/dist/production/src/execution/values.js +371 -0
- package/dist/production/src/execution/values.js.map +1 -0
- package/dist/production/src/introspection/resolvers.cjs +432 -0
- package/dist/production/src/introspection/resolvers.cjs.map +1 -0
- package/dist/production/src/introspection/resolvers.js +432 -0
- package/dist/production/src/introspection/resolvers.js.map +1 -0
- package/dist/production/src/introspection/types.cjs +267 -0
- package/dist/production/src/introspection/types.cjs.map +1 -0
- package/dist/production/src/introspection/types.js +267 -0
- package/dist/production/src/introspection/types.js.map +1 -0
- package/dist/production/src/scalars/builtIn.cjs +260 -0
- package/dist/production/src/scalars/builtIn.cjs.map +1 -0
- package/dist/production/src/scalars/builtIn.js +260 -0
- package/dist/production/src/scalars/builtIn.js.map +1 -0
- package/dist/production/src/schema/buildSchema.cjs +235 -0
- package/dist/production/src/schema/buildSchema.cjs.map +1 -0
- package/dist/production/src/schema/buildSchema.js +235 -0
- package/dist/production/src/schema/buildSchema.js.map +1 -0
- package/dist/production/src/types/resolvers.cjs +15 -0
- package/dist/production/src/types/resolvers.cjs.map +1 -0
- package/dist/production/src/types/resolvers.js +15 -0
- package/dist/production/src/types/resolvers.js.map +1 -0
- package/dist/production/src/types/schema.cjs +184 -0
- package/dist/production/src/types/schema.cjs.map +1 -0
- package/dist/production/src/types/schema.js +184 -0
- package/dist/production/src/types/schema.js.map +1 -0
- package/dist/production/src/utils/enumValues.cjs +49 -0
- package/dist/production/src/utils/enumValues.cjs.map +1 -0
- package/dist/production/src/utils/enumValues.js +49 -0
- package/dist/production/src/utils/enumValues.js.map +1 -0
- package/dist/production/src/utils/helpers.cjs +122 -0
- package/dist/production/src/utils/helpers.cjs.map +1 -0
- package/dist/production/src/utils/helpers.js +122 -0
- package/dist/production/src/utils/helpers.js.map +1 -0
- package/dist/production/src/utils/path.cjs +17 -0
- package/dist/production/src/utils/path.cjs.map +1 -0
- package/dist/production/src/utils/path.js +17 -0
- package/dist/production/src/utils/path.js.map +1 -0
- package/dist/production/src/utils/schemaInterner.cjs +297 -0
- package/dist/production/src/utils/schemaInterner.cjs.map +1 -0
- package/dist/production/src/utils/schemaInterner.js +297 -0
- package/dist/production/src/utils/schemaInterner.js.map +1 -0
- package/dist/production/src/utils/toGraphQLJsSchema.cjs +130 -0
- package/dist/production/src/utils/toGraphQLJsSchema.cjs.map +1 -0
- package/dist/production/src/utils/toGraphQLJsSchema.js +130 -0
- package/dist/production/src/utils/toGraphQLJsSchema.js.map +1 -0
- package/dist/production/src/utils/typeRef.cjs +246 -0
- package/dist/production/src/utils/typeRef.cjs.map +1 -0
- package/dist/production/src/utils/typeRef.js +246 -0
- package/dist/production/src/utils/typeRef.js.map +1 -0
- package/dist/production/src/validation/TypeInfo.cjs +309 -0
- package/dist/production/src/validation/TypeInfo.cjs.map +1 -0
- package/dist/production/src/validation/TypeInfo.js +309 -0
- package/dist/production/src/validation/TypeInfo.js.map +1 -0
- package/dist/production/src/validation/ValidationContext.cjs +170 -0
- package/dist/production/src/validation/ValidationContext.cjs.map +1 -0
- package/dist/production/src/validation/ValidationContext.js +170 -0
- package/dist/production/src/validation/ValidationContext.js.map +1 -0
- package/dist/production/src/validation/helpers.cjs +233 -0
- package/dist/production/src/validation/helpers.cjs.map +1 -0
- package/dist/production/src/validation/helpers.js +233 -0
- package/dist/production/src/validation/helpers.js.map +1 -0
- package/dist/production/src/validation/rules/ExecutableDefinitionsRule.cjs +25 -0
- package/dist/production/src/validation/rules/ExecutableDefinitionsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/ExecutableDefinitionsRule.js +25 -0
- package/dist/production/src/validation/rules/ExecutableDefinitionsRule.js.map +1 -0
- package/dist/production/src/validation/rules/FieldsOnCorrectTypeRule.cjs +80 -0
- package/dist/production/src/validation/rules/FieldsOnCorrectTypeRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/FieldsOnCorrectTypeRule.js +80 -0
- package/dist/production/src/validation/rules/FieldsOnCorrectTypeRule.js.map +1 -0
- package/dist/production/src/validation/rules/FragmentsOnCompositeTypesRule.cjs +39 -0
- package/dist/production/src/validation/rules/FragmentsOnCompositeTypesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/FragmentsOnCompositeTypesRule.js +39 -0
- package/dist/production/src/validation/rules/FragmentsOnCompositeTypesRule.js.map +1 -0
- package/dist/production/src/validation/rules/KnownArgumentNamesRule.cjs +62 -0
- package/dist/production/src/validation/rules/KnownArgumentNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/KnownArgumentNamesRule.js +62 -0
- package/dist/production/src/validation/rules/KnownArgumentNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/KnownDirectivesRule.cjs +99 -0
- package/dist/production/src/validation/rules/KnownDirectivesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/KnownDirectivesRule.js +99 -0
- package/dist/production/src/validation/rules/KnownDirectivesRule.js.map +1 -0
- package/dist/production/src/validation/rules/KnownFragmentNamesRule.cjs +18 -0
- package/dist/production/src/validation/rules/KnownFragmentNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/KnownFragmentNamesRule.js +18 -0
- package/dist/production/src/validation/rules/KnownFragmentNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/KnownTypeNamesRule.cjs +36 -0
- package/dist/production/src/validation/rules/KnownTypeNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/KnownTypeNamesRule.js +36 -0
- package/dist/production/src/validation/rules/KnownTypeNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/LoneAnonymousOperationRule.cjs +25 -0
- package/dist/production/src/validation/rules/LoneAnonymousOperationRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/LoneAnonymousOperationRule.js +25 -0
- package/dist/production/src/validation/rules/LoneAnonymousOperationRule.js.map +1 -0
- package/dist/production/src/validation/rules/MaxIntrospectionDepthRule.cjs +51 -0
- package/dist/production/src/validation/rules/MaxIntrospectionDepthRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/MaxIntrospectionDepthRule.js +51 -0
- package/dist/production/src/validation/rules/MaxIntrospectionDepthRule.js.map +1 -0
- package/dist/production/src/validation/rules/NoFragmentCyclesRule.cjs +68 -0
- package/dist/production/src/validation/rules/NoFragmentCyclesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/NoFragmentCyclesRule.js +68 -0
- package/dist/production/src/validation/rules/NoFragmentCyclesRule.js.map +1 -0
- package/dist/production/src/validation/rules/NoUndefinedVariablesRule.cjs +28 -0
- package/dist/production/src/validation/rules/NoUndefinedVariablesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/NoUndefinedVariablesRule.js +28 -0
- package/dist/production/src/validation/rules/NoUndefinedVariablesRule.js.map +1 -0
- package/dist/production/src/validation/rules/NoUnusedFragmentsRule.cjs +39 -0
- package/dist/production/src/validation/rules/NoUnusedFragmentsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/NoUnusedFragmentsRule.js +39 -0
- package/dist/production/src/validation/rules/NoUnusedFragmentsRule.js.map +1 -0
- package/dist/production/src/validation/rules/NoUnusedVariablesRule.cjs +36 -0
- package/dist/production/src/validation/rules/NoUnusedVariablesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/NoUnusedVariablesRule.js +36 -0
- package/dist/production/src/validation/rules/NoUnusedVariablesRule.js.map +1 -0
- package/dist/production/src/validation/rules/OverlappingFieldsCanBeMergedRule.cjs +326 -0
- package/dist/production/src/validation/rules/OverlappingFieldsCanBeMergedRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/OverlappingFieldsCanBeMergedRule.js +326 -0
- package/dist/production/src/validation/rules/OverlappingFieldsCanBeMergedRule.js.map +1 -0
- package/dist/production/src/validation/rules/PossibleFragmentSpreadsRule.cjs +71 -0
- package/dist/production/src/validation/rules/PossibleFragmentSpreadsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/PossibleFragmentSpreadsRule.js +71 -0
- package/dist/production/src/validation/rules/PossibleFragmentSpreadsRule.js.map +1 -0
- package/dist/production/src/validation/rules/ProvidedRequiredArgumentsRule.cjs +88 -0
- package/dist/production/src/validation/rules/ProvidedRequiredArgumentsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/ProvidedRequiredArgumentsRule.js +88 -0
- package/dist/production/src/validation/rules/ProvidedRequiredArgumentsRule.js.map +1 -0
- package/dist/production/src/validation/rules/ScalarLeafsRule.cjs +46 -0
- package/dist/production/src/validation/rules/ScalarLeafsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/ScalarLeafsRule.js +46 -0
- package/dist/production/src/validation/rules/ScalarLeafsRule.js.map +1 -0
- package/dist/production/src/validation/rules/SingleFieldSubscriptionsRule.cjs +51 -0
- package/dist/production/src/validation/rules/SingleFieldSubscriptionsRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/SingleFieldSubscriptionsRule.js +51 -0
- package/dist/production/src/validation/rules/SingleFieldSubscriptionsRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueArgumentNamesRule.cjs +34 -0
- package/dist/production/src/validation/rules/UniqueArgumentNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueArgumentNamesRule.js +34 -0
- package/dist/production/src/validation/rules/UniqueArgumentNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueDirectivesPerLocationRule.cjs +51 -0
- package/dist/production/src/validation/rules/UniqueDirectivesPerLocationRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueDirectivesPerLocationRule.js +51 -0
- package/dist/production/src/validation/rules/UniqueDirectivesPerLocationRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueFragmentNamesRule.cjs +28 -0
- package/dist/production/src/validation/rules/UniqueFragmentNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueFragmentNamesRule.js +28 -0
- package/dist/production/src/validation/rules/UniqueFragmentNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueInputFieldNamesRule.cjs +37 -0
- package/dist/production/src/validation/rules/UniqueInputFieldNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueInputFieldNamesRule.js +37 -0
- package/dist/production/src/validation/rules/UniqueInputFieldNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueOperationNamesRule.cjs +30 -0
- package/dist/production/src/validation/rules/UniqueOperationNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueOperationNamesRule.js +30 -0
- package/dist/production/src/validation/rules/UniqueOperationNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/UniqueVariableNamesRule.cjs +27 -0
- package/dist/production/src/validation/rules/UniqueVariableNamesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/UniqueVariableNamesRule.js +27 -0
- package/dist/production/src/validation/rules/UniqueVariableNamesRule.js.map +1 -0
- package/dist/production/src/validation/rules/ValuesOfCorrectTypeRule.cjs +123 -0
- package/dist/production/src/validation/rules/ValuesOfCorrectTypeRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/ValuesOfCorrectTypeRule.js +123 -0
- package/dist/production/src/validation/rules/ValuesOfCorrectTypeRule.js.map +1 -0
- package/dist/production/src/validation/rules/VariablesAreInputTypesRule.cjs +29 -0
- package/dist/production/src/validation/rules/VariablesAreInputTypesRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/VariablesAreInputTypesRule.js +29 -0
- package/dist/production/src/validation/rules/VariablesAreInputTypesRule.js.map +1 -0
- package/dist/production/src/validation/rules/VariablesInAllowedPositionRule.cjs +63 -0
- package/dist/production/src/validation/rules/VariablesInAllowedPositionRule.cjs.map +1 -0
- package/dist/production/src/validation/rules/VariablesInAllowedPositionRule.js +63 -0
- package/dist/production/src/validation/rules/VariablesInAllowedPositionRule.js.map +1 -0
- package/dist/production/src/validation/sortValueNode.cjs +71 -0
- package/dist/production/src/validation/sortValueNode.cjs.map +1 -0
- package/dist/production/src/validation/sortValueNode.js +71 -0
- package/dist/production/src/validation/sortValueNode.js.map +1 -0
- package/dist/production/src/validation/specifiedRules.cjs +87 -0
- package/dist/production/src/validation/specifiedRules.cjs.map +1 -0
- package/dist/production/src/validation/specifiedRules.js +87 -0
- package/dist/production/src/validation/specifiedRules.js.map +1 -0
- package/dist/production/src/validation/validate.cjs +53 -0
- package/dist/production/src/validation/validate.cjs.map +1 -0
- package/dist/production/src/validation/validate.js +53 -0
- package/dist/production/src/validation/validate.js.map +1 -0
- package/dist/tests/buildSchema.test.d.ts +2 -0
- package/dist/tests/buildSchema.test.d.ts.map +1 -0
- package/dist/tests/builtInScalars.test.d.ts +2 -0
- package/dist/tests/builtInScalars.test.d.ts.map +1 -0
- package/dist/tests/coercion.test.d.ts +2 -0
- package/dist/tests/coercion.test.d.ts.map +1 -0
- package/dist/tests/compat/abstract.test.d.ts +7 -0
- package/dist/tests/compat/abstract.test.d.ts.map +1 -0
- package/dist/tests/compat/adapter.d.ts +216 -0
- package/dist/tests/compat/adapter.d.ts.map +1 -0
- package/dist/tests/compat/directives.test.d.ts +7 -0
- package/dist/tests/compat/directives.test.d.ts.map +1 -0
- package/dist/tests/compat/executor.test.d.ts +7 -0
- package/dist/tests/compat/executor.test.d.ts.map +1 -0
- package/dist/tests/compat/lists.test.d.ts +7 -0
- package/dist/tests/compat/lists.test.d.ts.map +1 -0
- package/dist/tests/compat/nonnull.test.d.ts +7 -0
- package/dist/tests/compat/nonnull.test.d.ts.map +1 -0
- package/dist/tests/compat/testUtils.d.ts +30 -0
- package/dist/tests/compat/testUtils.d.ts.map +1 -0
- package/dist/tests/completedResult.test.d.ts +2 -0
- package/dist/tests/completedResult.test.d.ts.map +1 -0
- package/dist/tests/deprecatedInputValues.test.d.ts +2 -0
- package/dist/tests/deprecatedInputValues.test.d.ts.map +1 -0
- package/dist/tests/execute.test.d.ts +2 -0
- package/dist/tests/execute.test.d.ts.map +1 -0
- package/dist/tests/fieldErrors.test.d.ts +2 -0
- package/dist/tests/fieldErrors.test.d.ts.map +1 -0
- package/dist/tests/getArgumentValues.test.d.ts +2 -0
- package/dist/tests/getArgumentValues.test.d.ts.map +1 -0
- package/dist/tests/inspect.test.d.ts +2 -0
- package/dist/tests/inspect.test.d.ts.map +1 -0
- package/dist/tests/introspection.test.d.ts +2 -0
- package/dist/tests/introspection.test.d.ts.map +1 -0
- package/dist/tests/introspectionOrder.test.d.ts +2 -0
- package/dist/tests/introspectionOrder.test.d.ts.map +1 -0
- package/dist/tests/memoization.test.d.ts +2 -0
- package/dist/tests/memoization.test.d.ts.map +1 -0
- package/dist/tests/operationSelection.test.d.ts +2 -0
- package/dist/tests/operationSelection.test.d.ts.map +1 -0
- package/dist/tests/prototypeNames.test.d.ts +2 -0
- package/dist/tests/prototypeNames.test.d.ts.map +1 -0
- package/dist/tests/resolverLayers.test.d.ts +2 -0
- package/dist/tests/resolverLayers.test.d.ts.map +1 -0
- package/dist/tests/scalarParsers.test.d.ts +2 -0
- package/dist/tests/scalarParsers.test.d.ts.map +1 -0
- package/dist/tests/schemaInterner.test.d.ts +2 -0
- package/dist/tests/schemaInterner.test.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -0
- package/dist/tests/typedContext.test.d.ts +2 -0
- package/dist/tests/typedContext.test.d.ts.map +1 -0
- package/dist/tests/validation/graphqlJsDifferential.test.d.ts +2 -0
- package/dist/tests/validation/graphqlJsDifferential.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/MaxIntrospectionDepthRule.test.d.ts +2 -0
- package/dist/tests/validation/rules/MaxIntrospectionDepthRule.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/NoUnusedVariablesRule.test.d.ts +2 -0
- package/dist/tests/validation/rules/NoUnusedVariablesRule.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/OverlappingFieldsCanBeMergedRule.test.d.ts +2 -0
- package/dist/tests/validation/rules/OverlappingFieldsCanBeMergedRule.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/SingleFieldSubscriptionsRule.test.d.ts +2 -0
- package/dist/tests/validation/rules/SingleFieldSubscriptionsRule.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/differential.test.d.ts +2 -0
- package/dist/tests/validation/rules/differential.test.d.ts.map +1 -0
- package/dist/tests/validation/rules/harness.d.ts +10 -0
- package/dist/tests/validation/rules/harness.d.ts.map +1 -0
- package/dist/tests/validation/validate.test.d.ts +2 -0
- package/dist/tests/validation/validate.test.d.ts.map +1 -0
- package/dist/types/execution/collectFields.d.ts +16 -0
- package/dist/types/execution/collectFields.d.ts.map +1 -0
- package/dist/types/execution/complete.d.ts +24 -0
- package/dist/types/execution/complete.d.ts.map +1 -0
- package/dist/types/execution/context.d.ts +23 -0
- package/dist/types/execution/context.d.ts.map +1 -0
- package/dist/types/execution/directives.d.ts +9 -0
- package/dist/types/execution/directives.d.ts.map +1 -0
- package/dist/types/execution/execute.d.ts +15 -0
- package/dist/types/execution/execute.d.ts.map +1 -0
- package/dist/types/execution/fields.d.ts +26 -0
- package/dist/types/execution/fields.d.ts.map +1 -0
- package/dist/types/execution/introspectionResolvers.d.ts +13 -0
- package/dist/types/execution/introspectionResolvers.d.ts.map +1 -0
- package/dist/types/execution/values.d.ts +17 -0
- package/dist/types/execution/values.d.ts.map +1 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/introspection/index.d.ts +10 -0
- package/dist/types/introspection/index.d.ts.map +1 -0
- package/dist/types/introspection/resolvers.d.ts +141 -0
- package/dist/types/introspection/resolvers.d.ts.map +1 -0
- package/dist/types/introspection/types.d.ts +80 -0
- package/dist/types/introspection/types.d.ts.map +1 -0
- package/dist/types/scalars/builtIn.d.ts +42 -0
- package/dist/types/scalars/builtIn.d.ts.map +1 -0
- package/dist/types/schema/buildSchema.d.ts +14 -0
- package/dist/types/schema/buildSchema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/types/types/execution.d.ts +72 -0
- package/dist/types/types/execution.d.ts.map +1 -0
- package/dist/types/types/resolvers.d.ts +82 -0
- package/dist/types/types/resolvers.d.ts.map +1 -0
- package/dist/types/types/schema.d.ts +227 -0
- package/dist/types/types/schema.d.ts.map +1 -0
- package/dist/types/utils/enumValues.d.ts +18 -0
- package/dist/types/utils/enumValues.d.ts.map +1 -0
- package/dist/types/utils/helpers.d.ts +45 -0
- package/dist/types/utils/helpers.d.ts.map +1 -0
- package/dist/types/utils/path.d.ts +17 -0
- package/dist/types/utils/path.d.ts.map +1 -0
- package/dist/types/utils/schemaInterner.d.ts +54 -0
- package/dist/types/utils/schemaInterner.d.ts.map +1 -0
- package/dist/types/utils/toGraphQLJsSchema.d.ts +5 -0
- package/dist/types/utils/toGraphQLJsSchema.d.ts.map +1 -0
- package/dist/types/utils/typeRef.d.ts +61 -0
- package/dist/types/utils/typeRef.d.ts.map +1 -0
- package/dist/types/validation/TypeInfo.d.ts +57 -0
- package/dist/types/validation/TypeInfo.d.ts.map +1 -0
- package/dist/types/validation/ValidationContext.d.ts +59 -0
- package/dist/types/validation/ValidationContext.d.ts.map +1 -0
- package/dist/types/validation/helpers.d.ts +47 -0
- package/dist/types/validation/helpers.d.ts.map +1 -0
- package/dist/types/validation/rules/ExecutableDefinitionsRule.d.ts +13 -0
- package/dist/types/validation/rules/ExecutableDefinitionsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/FieldsOnCorrectTypeRule.d.ts +12 -0
- package/dist/types/validation/rules/FieldsOnCorrectTypeRule.d.ts.map +1 -0
- package/dist/types/validation/rules/FragmentsOnCompositeTypesRule.d.ts +13 -0
- package/dist/types/validation/rules/FragmentsOnCompositeTypesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/KnownArgumentNamesRule.d.ts +12 -0
- package/dist/types/validation/rules/KnownArgumentNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/KnownDirectivesRule.d.ts +12 -0
- package/dist/types/validation/rules/KnownDirectivesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/KnownFragmentNamesRule.d.ts +12 -0
- package/dist/types/validation/rules/KnownFragmentNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/KnownTypeNamesRule.d.ts +12 -0
- package/dist/types/validation/rules/KnownTypeNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/LoneAnonymousOperationRule.d.ts +12 -0
- package/dist/types/validation/rules/LoneAnonymousOperationRule.d.ts.map +1 -0
- package/dist/types/validation/rules/MaxIntrospectionDepthRule.d.ts +12 -0
- package/dist/types/validation/rules/MaxIntrospectionDepthRule.d.ts.map +1 -0
- package/dist/types/validation/rules/NoFragmentCyclesRule.d.ts +13 -0
- package/dist/types/validation/rules/NoFragmentCyclesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/NoUndefinedVariablesRule.d.ts +12 -0
- package/dist/types/validation/rules/NoUndefinedVariablesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/NoUnusedFragmentsRule.d.ts +12 -0
- package/dist/types/validation/rules/NoUnusedFragmentsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/NoUnusedVariablesRule.d.ts +12 -0
- package/dist/types/validation/rules/NoUnusedVariablesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +16 -0
- package/dist/types/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts.map +1 -0
- package/dist/types/validation/rules/PossibleFragmentSpreadsRule.d.ts +13 -0
- package/dist/types/validation/rules/PossibleFragmentSpreadsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/ProvidedRequiredArgumentsRule.d.ts +12 -0
- package/dist/types/validation/rules/ProvidedRequiredArgumentsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/ScalarLeafsRule.d.ts +12 -0
- package/dist/types/validation/rules/ScalarLeafsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/SingleFieldSubscriptionsRule.d.ts +12 -0
- package/dist/types/validation/rules/SingleFieldSubscriptionsRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueArgumentNamesRule.d.ts +12 -0
- package/dist/types/validation/rules/UniqueArgumentNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueDirectivesPerLocationRule.d.ts +12 -0
- package/dist/types/validation/rules/UniqueDirectivesPerLocationRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueFragmentNamesRule.d.ts +11 -0
- package/dist/types/validation/rules/UniqueFragmentNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueInputFieldNamesRule.d.ts +12 -0
- package/dist/types/validation/rules/UniqueInputFieldNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueOperationNamesRule.d.ts +11 -0
- package/dist/types/validation/rules/UniqueOperationNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/UniqueVariableNamesRule.d.ts +11 -0
- package/dist/types/validation/rules/UniqueVariableNamesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/ValuesOfCorrectTypeRule.d.ts +12 -0
- package/dist/types/validation/rules/ValuesOfCorrectTypeRule.d.ts.map +1 -0
- package/dist/types/validation/rules/VariablesAreInputTypesRule.d.ts +12 -0
- package/dist/types/validation/rules/VariablesAreInputTypesRule.d.ts.map +1 -0
- package/dist/types/validation/rules/VariablesInAllowedPositionRule.d.ts +11 -0
- package/dist/types/validation/rules/VariablesInAllowedPositionRule.d.ts.map +1 -0
- package/dist/types/validation/sortValueNode.d.ts +10 -0
- package/dist/types/validation/sortValueNode.d.ts.map +1 -0
- package/dist/types/validation/specifiedRules.d.ts +42 -0
- package/dist/types/validation/specifiedRules.d.ts.map +1 -0
- package/dist/types/validation/typeFromAST.d.ts +6 -0
- package/dist/types/validation/typeFromAST.d.ts.map +1 -0
- package/dist/types/validation/validate.d.ts +46 -0
- package/dist/types/validation/validate.d.ts.map +1 -0
- package/package.json +37 -4
- package/src/execution/collectFields.ts +220 -0
- package/src/execution/complete.ts +528 -0
- package/src/execution/context.ts +124 -0
- package/src/execution/directives.ts +76 -0
- package/src/execution/execute.ts +204 -0
- package/src/execution/fields.ts +256 -0
- package/src/execution/introspectionResolvers.ts +120 -0
- package/src/execution/values.ts +478 -0
- package/src/index.ts +145 -0
- package/src/introspection/index.ts +40 -0
- package/src/introspection/resolvers.ts +591 -0
- package/src/introspection/types.ts +319 -0
- package/src/scalars/builtIn.ts +316 -0
- package/src/schema/buildSchema.ts +322 -0
- package/src/tsconfig.json +6 -0
- package/src/types/execution.ts +94 -0
- package/src/types/resolvers.ts +119 -0
- package/src/types/schema.ts +346 -0
- package/src/utils/enumValues.ts +64 -0
- package/src/utils/helpers.ts +200 -0
- package/src/utils/path.ts +33 -0
- package/src/utils/schemaInterner.ts +362 -0
- package/src/utils/toGraphQLJsSchema.ts +164 -0
- package/src/utils/typeRef.ts +309 -0
- package/src/validation/TypeInfo.ts +390 -0
- package/src/validation/ValidationContext.ts +239 -0
- package/src/validation/helpers.ts +341 -0
- package/src/validation/rules/ExecutableDefinitionsRule.ts +40 -0
- package/src/validation/rules/FieldsOnCorrectTypeRule.ts +127 -0
- package/src/validation/rules/FragmentsOnCompositeTypesRule.ts +49 -0
- package/src/validation/rules/KnownArgumentNamesRule.ts +82 -0
- package/src/validation/rules/KnownDirectivesRule.ts +119 -0
- package/src/validation/rules/KnownFragmentNamesRule.ts +26 -0
- package/src/validation/rules/KnownTypeNamesRule.ts +51 -0
- package/src/validation/rules/LoneAnonymousOperationRule.ts +34 -0
- package/src/validation/rules/MaxIntrospectionDepthRule.ts +83 -0
- package/src/validation/rules/NoFragmentCyclesRule.ts +98 -0
- package/src/validation/rules/NoUndefinedVariablesRule.ts +39 -0
- package/src/validation/rules/NoUnusedFragmentsRule.ts +49 -0
- package/src/validation/rules/NoUnusedVariablesRule.ts +49 -0
- package/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts +512 -0
- package/src/validation/rules/PossibleFragmentSpreadsRule.ts +118 -0
- package/src/validation/rules/ProvidedRequiredArgumentsRule.ts +105 -0
- package/src/validation/rules/ScalarLeafsRule.ts +58 -0
- package/src/validation/rules/SingleFieldSubscriptionsRule.ts +64 -0
- package/src/validation/rules/UniqueArgumentNamesRule.ts +47 -0
- package/src/validation/rules/UniqueDirectivesPerLocationRule.ts +72 -0
- package/src/validation/rules/UniqueFragmentNamesRule.ts +36 -0
- package/src/validation/rules/UniqueInputFieldNamesRule.ts +46 -0
- package/src/validation/rules/UniqueOperationNamesRule.ts +38 -0
- package/src/validation/rules/UniqueVariableNamesRule.ts +36 -0
- package/src/validation/rules/ValuesOfCorrectTypeRule.ts +158 -0
- package/src/validation/rules/VariablesAreInputTypesRule.ts +39 -0
- package/src/validation/rules/VariablesInAllowedPositionRule.ts +96 -0
- package/src/validation/sortValueNode.ts +85 -0
- package/src/validation/specifiedRules.ts +126 -0
- package/src/validation/typeFromAST.ts +5 -0
- package/src/validation/validate.ts +112 -0
- package/tests/buildSchema.test.ts +398 -0
- package/tests/builtInScalars.test.ts +74 -0
- package/tests/coercion.test.ts +88 -0
- package/tests/compat/abstract.test.ts +717 -0
- package/tests/compat/adapter.ts +779 -0
- package/tests/compat/directives.test.ts +310 -0
- package/tests/compat/executor.test.ts +774 -0
- package/tests/compat/lists.test.ts +244 -0
- package/tests/compat/nonnull.test.ts +463 -0
- package/tests/compat/testUtils.ts +134 -0
- package/tests/completedResult.test.ts +125 -0
- package/tests/deprecatedInputValues.test.ts +39 -0
- package/tests/execute.test.ts +1945 -0
- package/tests/fieldErrors.test.ts +146 -0
- package/tests/getArgumentValues.test.ts +109 -0
- package/tests/inspect.test.ts +44 -0
- package/tests/introspection.test.ts +563 -0
- package/tests/introspectionOrder.test.ts +92 -0
- package/tests/memoization.test.ts +80 -0
- package/tests/operationSelection.test.ts +57 -0
- package/tests/prototypeNames.test.ts +176 -0
- package/tests/resolverLayers.test.ts +32 -0
- package/tests/scalarParsers.test.ts +111 -0
- package/tests/schemaInterner.test.ts +132 -0
- package/tests/tsconfig.json +9 -0
- package/tests/typedContext.test.ts +87 -0
- package/tests/validation/graphqlJsDifferential.test.ts +171 -0
- package/tests/validation/rules/MaxIntrospectionDepthRule.test.ts +557 -0
- package/tests/validation/rules/NoUnusedVariablesRule.test.ts +236 -0
- package/tests/validation/rules/OverlappingFieldsCanBeMergedRule.test.ts +1191 -0
- package/tests/validation/rules/SingleFieldSubscriptionsRule.test.ts +298 -0
- package/tests/validation/rules/differential.test.ts +264 -0
- package/tests/validation/rules/harness.ts +157 -0
- package/tests/validation/validate.test.ts +904 -0
- package/tsconfig.json +8 -0
- package/tsconfig.settings.json +3 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const graphql = require("graphql");
|
|
4
|
+
const schema = require("../types/schema.cjs");
|
|
5
|
+
const helpers = require("../utils/helpers.cjs");
|
|
6
|
+
const GRAPHQL_MAX_INT = 2147483647;
|
|
7
|
+
const GRAPHQL_MIN_INT = -2147483648;
|
|
8
|
+
function serializeObject(outputValue) {
|
|
9
|
+
if (helpers.isObjectLike(outputValue)) {
|
|
10
|
+
const valueOf = outputValue.valueOf;
|
|
11
|
+
if (typeof valueOf === "function") {
|
|
12
|
+
const valueOfResult = valueOf.call(outputValue);
|
|
13
|
+
if (!helpers.isObjectLike(valueOfResult)) {
|
|
14
|
+
return valueOfResult;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const toJSON = outputValue.toJSON;
|
|
18
|
+
if (typeof toJSON === "function") {
|
|
19
|
+
return toJSON.call(outputValue);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return outputValue;
|
|
23
|
+
}
|
|
24
|
+
const GraphQLIntScalar = {
|
|
25
|
+
serialize(outputValue) {
|
|
26
|
+
const coercedValue = serializeObject(outputValue);
|
|
27
|
+
if (typeof coercedValue === "boolean") {
|
|
28
|
+
return coercedValue ? 1 : 0;
|
|
29
|
+
}
|
|
30
|
+
let num = coercedValue;
|
|
31
|
+
if (typeof coercedValue === "string" && coercedValue !== "") {
|
|
32
|
+
num = Number(coercedValue);
|
|
33
|
+
}
|
|
34
|
+
if (typeof num !== "number" || !Number.isInteger(num)) {
|
|
35
|
+
throw new graphql.GraphQLError(
|
|
36
|
+
`Int cannot represent non-integer value: ${helpers.inspect(coercedValue)}`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
|
|
40
|
+
throw new graphql.GraphQLError(
|
|
41
|
+
"Int cannot represent non 32-bit signed integer value: " + helpers.inspect(coercedValue)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return num;
|
|
45
|
+
},
|
|
46
|
+
parseValue(inputValue) {
|
|
47
|
+
if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) {
|
|
48
|
+
throw new graphql.GraphQLError(
|
|
49
|
+
`Int cannot represent non-integer value: ${helpers.inspect(inputValue)}`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {
|
|
53
|
+
throw new graphql.GraphQLError(
|
|
54
|
+
`Int cannot represent non 32-bit signed integer value: ${inputValue}`
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return inputValue;
|
|
58
|
+
},
|
|
59
|
+
parseLiteral(valueNode) {
|
|
60
|
+
if (valueNode.kind !== graphql.Kind.INT) {
|
|
61
|
+
throw new graphql.GraphQLError(
|
|
62
|
+
`Int cannot represent non-integer value: ${graphql.print(valueNode)}`,
|
|
63
|
+
{ nodes: valueNode }
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const num = parseInt(valueNode.value, 10);
|
|
67
|
+
if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
|
|
68
|
+
throw new graphql.GraphQLError(
|
|
69
|
+
`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,
|
|
70
|
+
{ nodes: valueNode }
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return num;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const GraphQLFloatScalar = {
|
|
77
|
+
serialize(outputValue) {
|
|
78
|
+
const coercedValue = serializeObject(outputValue);
|
|
79
|
+
if (typeof coercedValue === "boolean") {
|
|
80
|
+
return coercedValue ? 1 : 0;
|
|
81
|
+
}
|
|
82
|
+
let num = coercedValue;
|
|
83
|
+
if (typeof coercedValue === "string" && coercedValue !== "") {
|
|
84
|
+
num = Number(coercedValue);
|
|
85
|
+
}
|
|
86
|
+
if (typeof num !== "number" || !Number.isFinite(num)) {
|
|
87
|
+
throw new graphql.GraphQLError(
|
|
88
|
+
`Float cannot represent non numeric value: ${helpers.inspect(coercedValue)}`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return num;
|
|
92
|
+
},
|
|
93
|
+
parseValue(inputValue) {
|
|
94
|
+
if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) {
|
|
95
|
+
throw new graphql.GraphQLError(
|
|
96
|
+
`Float cannot represent non numeric value: ${helpers.inspect(inputValue)}`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return inputValue;
|
|
100
|
+
},
|
|
101
|
+
parseLiteral(valueNode) {
|
|
102
|
+
if (valueNode.kind !== graphql.Kind.FLOAT && valueNode.kind !== graphql.Kind.INT) {
|
|
103
|
+
throw new graphql.GraphQLError(
|
|
104
|
+
`Float cannot represent non numeric value: ${graphql.print(valueNode)}`,
|
|
105
|
+
{ nodes: valueNode }
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
return parseFloat(valueNode.value);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const GraphQLStringScalar = {
|
|
112
|
+
serialize(outputValue) {
|
|
113
|
+
const coercedValue = serializeObject(outputValue);
|
|
114
|
+
if (typeof coercedValue === "string") {
|
|
115
|
+
return coercedValue;
|
|
116
|
+
}
|
|
117
|
+
if (typeof coercedValue === "boolean") {
|
|
118
|
+
return coercedValue ? "true" : "false";
|
|
119
|
+
}
|
|
120
|
+
if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) {
|
|
121
|
+
return String(coercedValue);
|
|
122
|
+
}
|
|
123
|
+
throw new graphql.GraphQLError(
|
|
124
|
+
`String cannot represent value: ${helpers.inspect(outputValue)}`
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
parseValue(inputValue) {
|
|
128
|
+
if (typeof inputValue !== "string") {
|
|
129
|
+
throw new graphql.GraphQLError(
|
|
130
|
+
`String cannot represent a non string value: ${helpers.inspect(inputValue)}`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
return inputValue;
|
|
134
|
+
},
|
|
135
|
+
parseLiteral(valueNode) {
|
|
136
|
+
if (valueNode.kind !== graphql.Kind.STRING) {
|
|
137
|
+
throw new graphql.GraphQLError(
|
|
138
|
+
`String cannot represent a non string value: ${graphql.print(valueNode)}`,
|
|
139
|
+
{ nodes: valueNode }
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
return valueNode.value;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const GraphQLBooleanScalar = {
|
|
146
|
+
serialize(outputValue) {
|
|
147
|
+
const coercedValue = serializeObject(outputValue);
|
|
148
|
+
if (typeof coercedValue === "boolean") {
|
|
149
|
+
return coercedValue;
|
|
150
|
+
}
|
|
151
|
+
if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) {
|
|
152
|
+
return coercedValue !== 0;
|
|
153
|
+
}
|
|
154
|
+
throw new graphql.GraphQLError(
|
|
155
|
+
`Boolean cannot represent a non boolean value: ${helpers.inspect(coercedValue)}`
|
|
156
|
+
);
|
|
157
|
+
},
|
|
158
|
+
parseValue(inputValue) {
|
|
159
|
+
if (typeof inputValue !== "boolean") {
|
|
160
|
+
throw new graphql.GraphQLError(
|
|
161
|
+
`Boolean cannot represent a non boolean value: ${helpers.inspect(inputValue)}`
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
return inputValue;
|
|
165
|
+
},
|
|
166
|
+
parseLiteral(valueNode) {
|
|
167
|
+
if (valueNode.kind !== graphql.Kind.BOOLEAN) {
|
|
168
|
+
throw new graphql.GraphQLError(
|
|
169
|
+
`Boolean cannot represent a non boolean value: ${graphql.print(valueNode)}`,
|
|
170
|
+
{ nodes: valueNode }
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
return valueNode.value;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const GraphQLIDScalar = {
|
|
177
|
+
serialize(outputValue) {
|
|
178
|
+
const coercedValue = serializeObject(outputValue);
|
|
179
|
+
if (typeof coercedValue === "string") {
|
|
180
|
+
return coercedValue;
|
|
181
|
+
}
|
|
182
|
+
if (typeof coercedValue === "number" && Number.isInteger(coercedValue)) {
|
|
183
|
+
return String(coercedValue);
|
|
184
|
+
}
|
|
185
|
+
throw new graphql.GraphQLError(
|
|
186
|
+
`ID cannot represent value: ${helpers.inspect(outputValue)}`
|
|
187
|
+
);
|
|
188
|
+
},
|
|
189
|
+
parseValue(inputValue) {
|
|
190
|
+
if (typeof inputValue === "string") {
|
|
191
|
+
return inputValue;
|
|
192
|
+
}
|
|
193
|
+
if (typeof inputValue === "number" && Number.isInteger(inputValue)) {
|
|
194
|
+
return String(inputValue);
|
|
195
|
+
}
|
|
196
|
+
throw new graphql.GraphQLError(
|
|
197
|
+
`ID cannot represent value: ${helpers.inspect(inputValue)}`
|
|
198
|
+
);
|
|
199
|
+
},
|
|
200
|
+
parseLiteral(valueNode) {
|
|
201
|
+
if (valueNode.kind !== graphql.Kind.STRING && valueNode.kind !== graphql.Kind.INT) {
|
|
202
|
+
throw new graphql.GraphQLError(
|
|
203
|
+
`ID cannot represent a non-string and non-integer value: ${graphql.print(valueNode)}`,
|
|
204
|
+
{ nodes: valueNode }
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
return valueNode.value;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const specifiedScalarTypes = {
|
|
211
|
+
String: [
|
|
212
|
+
schema.TypeKind.SCALAR,
|
|
213
|
+
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."
|
|
214
|
+
],
|
|
215
|
+
Int: [
|
|
216
|
+
schema.TypeKind.SCALAR,
|
|
217
|
+
"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."
|
|
218
|
+
],
|
|
219
|
+
Float: [
|
|
220
|
+
schema.TypeKind.SCALAR,
|
|
221
|
+
"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point)."
|
|
222
|
+
],
|
|
223
|
+
Boolean: [schema.TypeKind.SCALAR, "The `Boolean` scalar type represents `true` or `false`."],
|
|
224
|
+
ID: [
|
|
225
|
+
schema.TypeKind.SCALAR,
|
|
226
|
+
'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.'
|
|
227
|
+
]
|
|
228
|
+
};
|
|
229
|
+
function isSpecifiedScalarTypeName(name) {
|
|
230
|
+
return Object.prototype.hasOwnProperty.call(specifiedScalarTypes, name);
|
|
231
|
+
}
|
|
232
|
+
const builtInScalars = {
|
|
233
|
+
Int: GraphQLIntScalar,
|
|
234
|
+
Float: GraphQLFloatScalar,
|
|
235
|
+
String: GraphQLStringScalar,
|
|
236
|
+
Boolean: GraphQLBooleanScalar,
|
|
237
|
+
ID: GraphQLIDScalar
|
|
238
|
+
};
|
|
239
|
+
const scalarsWithBuiltInsCache = /* @__PURE__ */ new WeakMap();
|
|
240
|
+
function withBuiltInScalars(scalars) {
|
|
241
|
+
if (!scalars) {
|
|
242
|
+
return builtInScalars;
|
|
243
|
+
}
|
|
244
|
+
let merged = scalarsWithBuiltInsCache.get(scalars);
|
|
245
|
+
if (!merged) {
|
|
246
|
+
merged = { ...builtInScalars, ...scalars };
|
|
247
|
+
scalarsWithBuiltInsCache.set(scalars, merged);
|
|
248
|
+
}
|
|
249
|
+
return merged;
|
|
250
|
+
}
|
|
251
|
+
exports.GraphQLBooleanScalar = GraphQLBooleanScalar;
|
|
252
|
+
exports.GraphQLFloatScalar = GraphQLFloatScalar;
|
|
253
|
+
exports.GraphQLIDScalar = GraphQLIDScalar;
|
|
254
|
+
exports.GraphQLIntScalar = GraphQLIntScalar;
|
|
255
|
+
exports.GraphQLStringScalar = GraphQLStringScalar;
|
|
256
|
+
exports.builtInScalars = builtInScalars;
|
|
257
|
+
exports.isSpecifiedScalarTypeName = isSpecifiedScalarTypeName;
|
|
258
|
+
exports.specifiedScalarTypes = specifiedScalarTypes;
|
|
259
|
+
exports.withBuiltInScalars = withBuiltInScalars;
|
|
260
|
+
//# sourceMappingURL=builtIn.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtIn.cjs","sources":["../../../../../packages/graphql-json/src/scalars/builtIn.ts"],"sourcesContent":["/**\n * Built-in scalar implementations\n */\n\nimport { GraphQLError, Kind, print } from 'graphql'\nimport type { ValueNode } from 'graphql'\nimport type { ScalarImplementation, ScalarMap } from '../types/resolvers.js'\nimport { type ScalarType, TypeKind } from '../types/schema.js'\nimport { inspect, isObjectLike } from '../utils/helpers.js'\n\n// GraphQL Int limits (32-bit signed integer)\nconst GRAPHQL_MAX_INT = 2147483647\nconst GRAPHQL_MIN_INT = -2147483648\n\n/**\n * Serialize object value (handles valueOf)\n */\nfunction serializeObject(outputValue: unknown): unknown {\n\tif (isObjectLike(outputValue)) {\n\t\tconst valueOf = outputValue.valueOf\n\t\tif (typeof valueOf === 'function') {\n\t\t\tconst valueOfResult: unknown = valueOf.call(outputValue)\n\t\t\tif (!isObjectLike(valueOfResult)) {\n\t\t\t\treturn valueOfResult\n\t\t\t}\n\t\t}\n\t\tconst toJSON = outputValue.toJSON\n\t\tif (typeof toJSON === 'function') {\n\t\t\treturn toJSON.call(outputValue)\n\t\t}\n\t}\n\treturn outputValue\n}\n\n/**\n * Int scalar\n */\nexport const GraphQLIntScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): number {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 1 : 0\n\t\t}\n\n\t\tlet num = coercedValue\n\t\tif (typeof coercedValue === 'string' && coercedValue !== '') {\n\t\t\tnum = Number(coercedValue)\n\t\t}\n\n\t\tif (typeof num !== 'number' || !Number.isInteger(num)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${inspect(coercedValue)}`,\n\t\t\t)\n\t\t}\n\t\tif (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t'Int cannot represent non 32-bit signed integer value: ' + inspect(coercedValue),\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n\n\tparseValue(inputValue: unknown): number {\n\t\tif (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\tif (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non 32-bit signed integer value: ${inputValue}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): number {\n\t\tif (valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\tconst num = parseInt(valueNode.value, 10)\n\t\tif (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n}\n\n/**\n * Float scalar\n */\nexport const GraphQLFloatScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): number {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 1 : 0\n\t\t}\n\n\t\tlet num = coercedValue\n\t\tif (typeof coercedValue === 'string' && coercedValue !== '') {\n\t\t\tnum = Number(coercedValue)\n\t\t}\n\n\t\tif (typeof num !== 'number' || !Number.isFinite(num)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${inspect(coercedValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n\n\tparseValue(inputValue: unknown): number {\n\t\tif (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): number {\n\t\tif (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn parseFloat(valueNode.value)\n\t},\n}\n\n/**\n * String scalar\n */\nexport const GraphQLStringScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): string {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'string') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 'true' : 'false'\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n\t\t\treturn String(coercedValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`String cannot represent value: ${inspect(outputValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): string {\n\t\tif (typeof inputValue !== 'string') {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`String cannot represent a non string value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): string {\n\t\tif (valueNode.kind !== Kind.STRING) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`String cannot represent a non string value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * Boolean scalar\n */\nexport const GraphQLBooleanScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): boolean {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n\t\t\treturn coercedValue !== 0\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`Boolean cannot represent a non boolean value: ${inspect(coercedValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): boolean {\n\t\tif (typeof inputValue !== 'boolean') {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Boolean cannot represent a non boolean value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): boolean {\n\t\tif (valueNode.kind !== Kind.BOOLEAN) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Boolean cannot represent a non boolean value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * ID scalar\n */\nexport const GraphQLIDScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): string {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'string') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isInteger(coercedValue)) {\n\t\t\treturn String(coercedValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`ID cannot represent value: ${inspect(outputValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): string {\n\t\tif (typeof inputValue === 'string') {\n\t\t\treturn inputValue\n\t\t}\n\t\tif (typeof inputValue === 'number' && Number.isInteger(inputValue)) {\n\t\t\treturn String(inputValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`ID cannot represent value: ${inspect(inputValue)}`,\n\t\t)\n\t},\n\n\tparseLiteral(valueNode: ValueNode): string {\n\t\tif (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`ID cannot represent a non-string and non-integer value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * The scalar types graphql-js specifies, with their graphql-js descriptions, in its `specifiedScalarTypes` order\n */\nexport const specifiedScalarTypes: Record<'String' | 'Int' | 'Float' | 'Boolean' | 'ID', ScalarType> = {\n\tString: [\n\t\tTypeKind.SCALAR,\n\t\t'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',\n\t],\n\tInt: [\n\t\tTypeKind.SCALAR,\n\t\t'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',\n\t],\n\tFloat: [\n\t\tTypeKind.SCALAR,\n\t\t'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',\n\t],\n\tBoolean: [TypeKind.SCALAR, 'The `Boolean` scalar type represents `true` or `false`.'],\n\tID: [\n\t\tTypeKind.SCALAR,\n\t\t'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.',\n\t],\n}\n\n/**\n * Whether the name is one of the scalars graphql-js specifies\n */\nexport function isSpecifiedScalarTypeName(name: string): name is keyof typeof specifiedScalarTypes {\n\treturn Object.prototype.hasOwnProperty.call(specifiedScalarTypes, name)\n}\n\n/**\n * Built-in scalar map\n */\nexport const builtInScalars: ScalarMap = {\n\tInt: GraphQLIntScalar,\n\tFloat: GraphQLFloatScalar,\n\tString: GraphQLStringScalar,\n\tBoolean: GraphQLBooleanScalar,\n\tID: GraphQLIDScalar,\n}\n\nconst scalarsWithBuiltInsCache = new WeakMap<ScalarMap, ScalarMap>()\n\n/**\n * Built-in scalars overridden by the given custom scalars, memoized per `scalars` object.\n */\nexport function withBuiltInScalars(scalars?: ScalarMap): ScalarMap {\n\tif (!scalars) {\n\t\treturn builtInScalars\n\t}\n\tlet merged = scalarsWithBuiltInsCache.get(scalars)\n\tif (!merged) {\n\t\tmerged = { ...builtInScalars, ...scalars }\n\t\tscalarsWithBuiltInsCache.set(scalars, merged)\n\t}\n\treturn merged\n}\n"],"names":["isObjectLike","GraphQLError","inspect","Kind","print","TypeKind"],"mappings":";;;;;AAWA,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AAKxB,SAAS,gBAAgB,aAA+B;AACvD,MAAIA,QAAAA,aAAa,WAAW,GAAG;AAC9B,UAAM,UAAU,YAAY;AAC5B,QAAI,OAAO,YAAY,YAAY;AAClC,YAAM,gBAAyB,QAAQ,KAAK,WAAW;AACvD,UAAI,CAACA,QAAAA,aAAa,aAAa,GAAG;AACjC,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,SAAS,YAAY;AAC3B,QAAI,OAAO,WAAW,YAAY;AACjC,aAAO,OAAO,KAAK,WAAW;AAAA,IAC/B;AAAA,EACD;AACA,SAAO;AACR;AAKO,MAAM,mBAAyC;AAAA,EACrD,UAAU,aAA8B;AACvC,UAAM,eAAe,gBAAgB,WAAW;AAEhD,QAAI,OAAO,iBAAiB,WAAW;AACtC,aAAO,eAAe,IAAI;AAAA,IAC3B;AAEA,QAAI,MAAM;AACV,QAAI,OAAO,iBAAiB,YAAY,iBAAiB,IAAI;AAC5D,YAAM,OAAO,YAAY;AAAA,IAC1B;AAEA,QAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,UAAU,GAAG,GA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AAS,EAAE,GAAG,gBAAgB,GAAG,QAAA;AACjC,6BAAyB,IAAI,SAAS,MAAM;AAAA,EAC7C;AACA,SAAO;AACR;;;;;;;;;;"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { Kind, GraphQLError, print } from "graphql";
|
|
2
|
+
import { TypeKind } from "../types/schema.js";
|
|
3
|
+
import { inspect, isObjectLike } from "../utils/helpers.js";
|
|
4
|
+
const GRAPHQL_MAX_INT = 2147483647;
|
|
5
|
+
const GRAPHQL_MIN_INT = -2147483648;
|
|
6
|
+
function serializeObject(outputValue) {
|
|
7
|
+
if (isObjectLike(outputValue)) {
|
|
8
|
+
const valueOf = outputValue.valueOf;
|
|
9
|
+
if (typeof valueOf === "function") {
|
|
10
|
+
const valueOfResult = valueOf.call(outputValue);
|
|
11
|
+
if (!isObjectLike(valueOfResult)) {
|
|
12
|
+
return valueOfResult;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const toJSON = outputValue.toJSON;
|
|
16
|
+
if (typeof toJSON === "function") {
|
|
17
|
+
return toJSON.call(outputValue);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return outputValue;
|
|
21
|
+
}
|
|
22
|
+
const GraphQLIntScalar = {
|
|
23
|
+
serialize(outputValue) {
|
|
24
|
+
const coercedValue = serializeObject(outputValue);
|
|
25
|
+
if (typeof coercedValue === "boolean") {
|
|
26
|
+
return coercedValue ? 1 : 0;
|
|
27
|
+
}
|
|
28
|
+
let num = coercedValue;
|
|
29
|
+
if (typeof coercedValue === "string" && coercedValue !== "") {
|
|
30
|
+
num = Number(coercedValue);
|
|
31
|
+
}
|
|
32
|
+
if (typeof num !== "number" || !Number.isInteger(num)) {
|
|
33
|
+
throw new GraphQLError(
|
|
34
|
+
`Int cannot represent non-integer value: ${inspect(coercedValue)}`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
|
|
38
|
+
throw new GraphQLError(
|
|
39
|
+
"Int cannot represent non 32-bit signed integer value: " + inspect(coercedValue)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
return num;
|
|
43
|
+
},
|
|
44
|
+
parseValue(inputValue) {
|
|
45
|
+
if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) {
|
|
46
|
+
throw new GraphQLError(
|
|
47
|
+
`Int cannot represent non-integer value: ${inspect(inputValue)}`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {
|
|
51
|
+
throw new GraphQLError(
|
|
52
|
+
`Int cannot represent non 32-bit signed integer value: ${inputValue}`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return inputValue;
|
|
56
|
+
},
|
|
57
|
+
parseLiteral(valueNode) {
|
|
58
|
+
if (valueNode.kind !== Kind.INT) {
|
|
59
|
+
throw new GraphQLError(
|
|
60
|
+
`Int cannot represent non-integer value: ${print(valueNode)}`,
|
|
61
|
+
{ nodes: valueNode }
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
const num = parseInt(valueNode.value, 10);
|
|
65
|
+
if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
|
|
66
|
+
throw new GraphQLError(
|
|
67
|
+
`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,
|
|
68
|
+
{ nodes: valueNode }
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
return num;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const GraphQLFloatScalar = {
|
|
75
|
+
serialize(outputValue) {
|
|
76
|
+
const coercedValue = serializeObject(outputValue);
|
|
77
|
+
if (typeof coercedValue === "boolean") {
|
|
78
|
+
return coercedValue ? 1 : 0;
|
|
79
|
+
}
|
|
80
|
+
let num = coercedValue;
|
|
81
|
+
if (typeof coercedValue === "string" && coercedValue !== "") {
|
|
82
|
+
num = Number(coercedValue);
|
|
83
|
+
}
|
|
84
|
+
if (typeof num !== "number" || !Number.isFinite(num)) {
|
|
85
|
+
throw new GraphQLError(
|
|
86
|
+
`Float cannot represent non numeric value: ${inspect(coercedValue)}`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return num;
|
|
90
|
+
},
|
|
91
|
+
parseValue(inputValue) {
|
|
92
|
+
if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) {
|
|
93
|
+
throw new GraphQLError(
|
|
94
|
+
`Float cannot represent non numeric value: ${inspect(inputValue)}`
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return inputValue;
|
|
98
|
+
},
|
|
99
|
+
parseLiteral(valueNode) {
|
|
100
|
+
if (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) {
|
|
101
|
+
throw new GraphQLError(
|
|
102
|
+
`Float cannot represent non numeric value: ${print(valueNode)}`,
|
|
103
|
+
{ nodes: valueNode }
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return parseFloat(valueNode.value);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const GraphQLStringScalar = {
|
|
110
|
+
serialize(outputValue) {
|
|
111
|
+
const coercedValue = serializeObject(outputValue);
|
|
112
|
+
if (typeof coercedValue === "string") {
|
|
113
|
+
return coercedValue;
|
|
114
|
+
}
|
|
115
|
+
if (typeof coercedValue === "boolean") {
|
|
116
|
+
return coercedValue ? "true" : "false";
|
|
117
|
+
}
|
|
118
|
+
if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) {
|
|
119
|
+
return String(coercedValue);
|
|
120
|
+
}
|
|
121
|
+
throw new GraphQLError(
|
|
122
|
+
`String cannot represent value: ${inspect(outputValue)}`
|
|
123
|
+
);
|
|
124
|
+
},
|
|
125
|
+
parseValue(inputValue) {
|
|
126
|
+
if (typeof inputValue !== "string") {
|
|
127
|
+
throw new GraphQLError(
|
|
128
|
+
`String cannot represent a non string value: ${inspect(inputValue)}`
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
return inputValue;
|
|
132
|
+
},
|
|
133
|
+
parseLiteral(valueNode) {
|
|
134
|
+
if (valueNode.kind !== Kind.STRING) {
|
|
135
|
+
throw new GraphQLError(
|
|
136
|
+
`String cannot represent a non string value: ${print(valueNode)}`,
|
|
137
|
+
{ nodes: valueNode }
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
return valueNode.value;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const GraphQLBooleanScalar = {
|
|
144
|
+
serialize(outputValue) {
|
|
145
|
+
const coercedValue = serializeObject(outputValue);
|
|
146
|
+
if (typeof coercedValue === "boolean") {
|
|
147
|
+
return coercedValue;
|
|
148
|
+
}
|
|
149
|
+
if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) {
|
|
150
|
+
return coercedValue !== 0;
|
|
151
|
+
}
|
|
152
|
+
throw new GraphQLError(
|
|
153
|
+
`Boolean cannot represent a non boolean value: ${inspect(coercedValue)}`
|
|
154
|
+
);
|
|
155
|
+
},
|
|
156
|
+
parseValue(inputValue) {
|
|
157
|
+
if (typeof inputValue !== "boolean") {
|
|
158
|
+
throw new GraphQLError(
|
|
159
|
+
`Boolean cannot represent a non boolean value: ${inspect(inputValue)}`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
return inputValue;
|
|
163
|
+
},
|
|
164
|
+
parseLiteral(valueNode) {
|
|
165
|
+
if (valueNode.kind !== Kind.BOOLEAN) {
|
|
166
|
+
throw new GraphQLError(
|
|
167
|
+
`Boolean cannot represent a non boolean value: ${print(valueNode)}`,
|
|
168
|
+
{ nodes: valueNode }
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
return valueNode.value;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const GraphQLIDScalar = {
|
|
175
|
+
serialize(outputValue) {
|
|
176
|
+
const coercedValue = serializeObject(outputValue);
|
|
177
|
+
if (typeof coercedValue === "string") {
|
|
178
|
+
return coercedValue;
|
|
179
|
+
}
|
|
180
|
+
if (typeof coercedValue === "number" && Number.isInteger(coercedValue)) {
|
|
181
|
+
return String(coercedValue);
|
|
182
|
+
}
|
|
183
|
+
throw new GraphQLError(
|
|
184
|
+
`ID cannot represent value: ${inspect(outputValue)}`
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
parseValue(inputValue) {
|
|
188
|
+
if (typeof inputValue === "string") {
|
|
189
|
+
return inputValue;
|
|
190
|
+
}
|
|
191
|
+
if (typeof inputValue === "number" && Number.isInteger(inputValue)) {
|
|
192
|
+
return String(inputValue);
|
|
193
|
+
}
|
|
194
|
+
throw new GraphQLError(
|
|
195
|
+
`ID cannot represent value: ${inspect(inputValue)}`
|
|
196
|
+
);
|
|
197
|
+
},
|
|
198
|
+
parseLiteral(valueNode) {
|
|
199
|
+
if (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) {
|
|
200
|
+
throw new GraphQLError(
|
|
201
|
+
`ID cannot represent a non-string and non-integer value: ${print(valueNode)}`,
|
|
202
|
+
{ nodes: valueNode }
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
return valueNode.value;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const specifiedScalarTypes = {
|
|
209
|
+
String: [
|
|
210
|
+
TypeKind.SCALAR,
|
|
211
|
+
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text."
|
|
212
|
+
],
|
|
213
|
+
Int: [
|
|
214
|
+
TypeKind.SCALAR,
|
|
215
|
+
"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."
|
|
216
|
+
],
|
|
217
|
+
Float: [
|
|
218
|
+
TypeKind.SCALAR,
|
|
219
|
+
"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point)."
|
|
220
|
+
],
|
|
221
|
+
Boolean: [TypeKind.SCALAR, "The `Boolean` scalar type represents `true` or `false`."],
|
|
222
|
+
ID: [
|
|
223
|
+
TypeKind.SCALAR,
|
|
224
|
+
'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.'
|
|
225
|
+
]
|
|
226
|
+
};
|
|
227
|
+
function isSpecifiedScalarTypeName(name) {
|
|
228
|
+
return Object.prototype.hasOwnProperty.call(specifiedScalarTypes, name);
|
|
229
|
+
}
|
|
230
|
+
const builtInScalars = {
|
|
231
|
+
Int: GraphQLIntScalar,
|
|
232
|
+
Float: GraphQLFloatScalar,
|
|
233
|
+
String: GraphQLStringScalar,
|
|
234
|
+
Boolean: GraphQLBooleanScalar,
|
|
235
|
+
ID: GraphQLIDScalar
|
|
236
|
+
};
|
|
237
|
+
const scalarsWithBuiltInsCache = /* @__PURE__ */ new WeakMap();
|
|
238
|
+
function withBuiltInScalars(scalars) {
|
|
239
|
+
if (!scalars) {
|
|
240
|
+
return builtInScalars;
|
|
241
|
+
}
|
|
242
|
+
let merged = scalarsWithBuiltInsCache.get(scalars);
|
|
243
|
+
if (!merged) {
|
|
244
|
+
merged = { ...builtInScalars, ...scalars };
|
|
245
|
+
scalarsWithBuiltInsCache.set(scalars, merged);
|
|
246
|
+
}
|
|
247
|
+
return merged;
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
GraphQLBooleanScalar,
|
|
251
|
+
GraphQLFloatScalar,
|
|
252
|
+
GraphQLIDScalar,
|
|
253
|
+
GraphQLIntScalar,
|
|
254
|
+
GraphQLStringScalar,
|
|
255
|
+
builtInScalars,
|
|
256
|
+
isSpecifiedScalarTypeName,
|
|
257
|
+
specifiedScalarTypes,
|
|
258
|
+
withBuiltInScalars
|
|
259
|
+
};
|
|
260
|
+
//# sourceMappingURL=builtIn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtIn.js","sources":["../../../../../packages/graphql-json/src/scalars/builtIn.ts"],"sourcesContent":["/**\n * Built-in scalar implementations\n */\n\nimport { GraphQLError, Kind, print } from 'graphql'\nimport type { ValueNode } from 'graphql'\nimport type { ScalarImplementation, ScalarMap } from '../types/resolvers.js'\nimport { type ScalarType, TypeKind } from '../types/schema.js'\nimport { inspect, isObjectLike } from '../utils/helpers.js'\n\n// GraphQL Int limits (32-bit signed integer)\nconst GRAPHQL_MAX_INT = 2147483647\nconst GRAPHQL_MIN_INT = -2147483648\n\n/**\n * Serialize object value (handles valueOf)\n */\nfunction serializeObject(outputValue: unknown): unknown {\n\tif (isObjectLike(outputValue)) {\n\t\tconst valueOf = outputValue.valueOf\n\t\tif (typeof valueOf === 'function') {\n\t\t\tconst valueOfResult: unknown = valueOf.call(outputValue)\n\t\t\tif (!isObjectLike(valueOfResult)) {\n\t\t\t\treturn valueOfResult\n\t\t\t}\n\t\t}\n\t\tconst toJSON = outputValue.toJSON\n\t\tif (typeof toJSON === 'function') {\n\t\t\treturn toJSON.call(outputValue)\n\t\t}\n\t}\n\treturn outputValue\n}\n\n/**\n * Int scalar\n */\nexport const GraphQLIntScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): number {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 1 : 0\n\t\t}\n\n\t\tlet num = coercedValue\n\t\tif (typeof coercedValue === 'string' && coercedValue !== '') {\n\t\t\tnum = Number(coercedValue)\n\t\t}\n\n\t\tif (typeof num !== 'number' || !Number.isInteger(num)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${inspect(coercedValue)}`,\n\t\t\t)\n\t\t}\n\t\tif (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t'Int cannot represent non 32-bit signed integer value: ' + inspect(coercedValue),\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n\n\tparseValue(inputValue: unknown): number {\n\t\tif (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\tif (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non 32-bit signed integer value: ${inputValue}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): number {\n\t\tif (valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non-integer value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\tconst num = parseInt(valueNode.value, 10)\n\t\tif (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n}\n\n/**\n * Float scalar\n */\nexport const GraphQLFloatScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): number {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 1 : 0\n\t\t}\n\n\t\tlet num = coercedValue\n\t\tif (typeof coercedValue === 'string' && coercedValue !== '') {\n\t\t\tnum = Number(coercedValue)\n\t\t}\n\n\t\tif (typeof num !== 'number' || !Number.isFinite(num)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${inspect(coercedValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn num\n\t},\n\n\tparseValue(inputValue: unknown): number {\n\t\tif (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): number {\n\t\tif (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Float cannot represent non numeric value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn parseFloat(valueNode.value)\n\t},\n}\n\n/**\n * String scalar\n */\nexport const GraphQLStringScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): string {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'string') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue ? 'true' : 'false'\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n\t\t\treturn String(coercedValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`String cannot represent value: ${inspect(outputValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): string {\n\t\tif (typeof inputValue !== 'string') {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`String cannot represent a non string value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): string {\n\t\tif (valueNode.kind !== Kind.STRING) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`String cannot represent a non string value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * Boolean scalar\n */\nexport const GraphQLBooleanScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): boolean {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'boolean') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n\t\t\treturn coercedValue !== 0\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`Boolean cannot represent a non boolean value: ${inspect(coercedValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): boolean {\n\t\tif (typeof inputValue !== 'boolean') {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Boolean cannot represent a non boolean value: ${inspect(inputValue)}`,\n\t\t\t)\n\t\t}\n\t\treturn inputValue\n\t},\n\n\tparseLiteral(valueNode: ValueNode): boolean {\n\t\tif (valueNode.kind !== Kind.BOOLEAN) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`Boolean cannot represent a non boolean value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * ID scalar\n */\nexport const GraphQLIDScalar: ScalarImplementation = {\n\tserialize(outputValue: unknown): string {\n\t\tconst coercedValue = serializeObject(outputValue)\n\n\t\tif (typeof coercedValue === 'string') {\n\t\t\treturn coercedValue\n\t\t}\n\t\tif (typeof coercedValue === 'number' && Number.isInteger(coercedValue)) {\n\t\t\treturn String(coercedValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`ID cannot represent value: ${inspect(outputValue)}`,\n\t\t)\n\t},\n\n\tparseValue(inputValue: unknown): string {\n\t\tif (typeof inputValue === 'string') {\n\t\t\treturn inputValue\n\t\t}\n\t\tif (typeof inputValue === 'number' && Number.isInteger(inputValue)) {\n\t\t\treturn String(inputValue)\n\t\t}\n\t\tthrow new GraphQLError(\n\t\t\t`ID cannot represent value: ${inspect(inputValue)}`,\n\t\t)\n\t},\n\n\tparseLiteral(valueNode: ValueNode): string {\n\t\tif (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) {\n\t\t\tthrow new GraphQLError(\n\t\t\t\t`ID cannot represent a non-string and non-integer value: ${print(valueNode)}`,\n\t\t\t\t{ nodes: valueNode },\n\t\t\t)\n\t\t}\n\t\treturn valueNode.value\n\t},\n}\n\n/**\n * The scalar types graphql-js specifies, with their graphql-js descriptions, in its `specifiedScalarTypes` order\n */\nexport const specifiedScalarTypes: Record<'String' | 'Int' | 'Float' | 'Boolean' | 'ID', ScalarType> = {\n\tString: [\n\t\tTypeKind.SCALAR,\n\t\t'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',\n\t],\n\tInt: [\n\t\tTypeKind.SCALAR,\n\t\t'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',\n\t],\n\tFloat: [\n\t\tTypeKind.SCALAR,\n\t\t'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',\n\t],\n\tBoolean: [TypeKind.SCALAR, 'The `Boolean` scalar type represents `true` or `false`.'],\n\tID: [\n\t\tTypeKind.SCALAR,\n\t\t'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.',\n\t],\n}\n\n/**\n * Whether the name is one of the scalars graphql-js specifies\n */\nexport function isSpecifiedScalarTypeName(name: string): name is keyof typeof specifiedScalarTypes {\n\treturn Object.prototype.hasOwnProperty.call(specifiedScalarTypes, name)\n}\n\n/**\n * Built-in scalar map\n */\nexport const builtInScalars: ScalarMap = {\n\tInt: GraphQLIntScalar,\n\tFloat: GraphQLFloatScalar,\n\tString: GraphQLStringScalar,\n\tBoolean: GraphQLBooleanScalar,\n\tID: GraphQLIDScalar,\n}\n\nconst scalarsWithBuiltInsCache = new WeakMap<ScalarMap, ScalarMap>()\n\n/**\n * Built-in scalars overridden by the given custom scalars, memoized per `scalars` object.\n */\nexport function withBuiltInScalars(scalars?: ScalarMap): ScalarMap {\n\tif (!scalars) {\n\t\treturn builtInScalars\n\t}\n\tlet merged = scalarsWithBuiltInsCache.get(scalars)\n\tif (!merged) {\n\t\tmerged = { ...builtInScalars, ...scalars }\n\t\tscalarsWithBuiltInsCache.set(scalars, merged)\n\t}\n\treturn merged\n}\n"],"names":[],"mappings":";;;AAWA,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AAKxB,SAAS,gBAAgB,aAA+B;AACvD,MAAI,aAAa,WAAW,GAAG;AAC9B,UAAM,UAAU,YAAY;AAC5B,QAAI,OAAO,YAAY,YAAY;AAClC,YAAM,gBAAyB,QAAQ,KAAK,WAAW;AACvD,UAAI,CAAC,aAAa,aAAa,GAAG;AACjC,eAAO;AAAA,MACR;AAAA,IACD;AACA,UAAM,SAAS,YAAY;AAC3B,QAAI,OAAO,WAAW,YAAY;AACjC,aAAO,OAAO,KAAK,WAAW;AAAA,IAC/B;AAAA,EACD;AACA,SAAO;AACR;AAKO,MAAM,mBAAyC;AAAA,EACrD,UAAU,aAA8B;AACvC,UAAM,eAAe,gBAAgB,WAAW;AAEhD,QAAI,OAAO,iBAAiB,WAAW;AACtC,aAAO,eAAe,IAAI;AAAA,IAC3B;AAEA,QAAI,MAAM;AACV,QAAI,OAAO,iBAAiB,YAAY,iBAAiB,IAAI;AAC5D,YAAM,OAAO,YAAY;AAAA,IAC1B;AAEA,QAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,UAAU,GAAG,GAAG;AACtD,YAAM,IAAI;AAAA,QACT,2CAA2C,QAAQ,YAAY,CAAC;AAAA,MAAA;AAAA,IAElE;AACA,QAAI,MAAM,mBAAmB,MAAM,iBAAiB;AACnD,YAAM,IAAI;AAAA,QACT,2DAA2D,QAAQ,YAAY;AAAA,MAAA;AAAA,IAEjF;AACA,WAAO;AAAA,EACR;AAAA,EAEA,WAAW,YAA6B;AACvC,QAAI,OAAO,eAAe,YAAY,CAAC,OAAO,UAAU,UAAU,GAAG;AACpE,YAAM,IAAI;AAAA,QACT,2CAA2C,QAAQ,UAAU,CAAC;AAAA,MAAA;AAAA,IAE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