@wundergraph/composition
Advanced tools
Comparing version 0.20.0 to 0.20.1
@@ -74,3 +74,3 @@ "use strict"; | ||
default: | ||
throw (0, errors_1.unexpectedKindFatalError)(typeName); | ||
return false; | ||
} | ||
@@ -77,0 +77,0 @@ } |
@@ -39,10 +39,12 @@ import { ConstDirectiveNode, Kind, OperationTypeNode, SchemaExtensionNode, TypeDefinitionNode, TypeExtensionNode } from 'graphql'; | ||
export declare function undefinedRequiredArgumentsErrorMessage(directiveName: string, hostPath: string, requiredArguments: string[], missingRequiredArguments?: string[]): string; | ||
export declare function unexpectedDirectiveArgumentErrorMessage(directiveName: string, argumentName: string): string; | ||
export declare function duplicateDirectiveArgumentDefinitionErrorMessage(directiveName: string, hostPath: string, argumentName: string): string; | ||
export declare function unexpectedDirectiveArgumentErrorMessage(directiveName: string, argumentNames: string[]): string; | ||
export declare function duplicateDirectiveArgumentDefinitionsErrorMessage(directiveName: string, hostPath: string, argumentNames: string[]): string; | ||
export declare function invalidDirectiveArgumentTypeErrorMessage(required: boolean, argumentName: string, expectedKind: Kind, actualKind: Kind): string; | ||
export declare function invalidKeyDirectiveArgumentErrorMessage(directiveKind: Kind): string; | ||
export declare function invalidKeyDirectivesError(parentTypeName: string, errorMessages: string[]): Error; | ||
export declare function maximumTypeNestingExceededFatalError(path: string, maximumTypeNesting: number): Error; | ||
export declare function maximumTypeNestingExceededError(path: string, maximumTypeNesting: number): Error; | ||
export declare function unexpectedKindFatalError(typeName: string): Error; | ||
export declare function incompatibleParentKindFatalError(parentTypeName: string, expectedKind: Kind, actualKind: Kind): Error; | ||
export declare function incompatibleParentKindMergeError(parentTypeName: string, expectedTypeString: string, actualTypeString: string): Error; | ||
export declare function incompatibleObjectExtensionOrphanBaseTypeError(parentTypeName: string, actualTypeString: string): Error; | ||
export declare function fieldTypeMergeFatalError(fieldName: string): Error; | ||
@@ -54,2 +56,3 @@ export declare function unexpectedDirectiveLocationError(locationName: string): Error; | ||
export declare function unexpectedParentKindErrorMessage(parentTypeName: string, expectedTypeString: string, actualTypeString: string): string; | ||
export declare function unexpectedParentKindForChildError(parentTypeName: string, expectedTypeString: string, actualTypeString: string, childName: string, childTypeString: string): Error; | ||
export declare function subgraphValidationError(subgraphName: string, errors: Error[]): Error; | ||
@@ -106,1 +109,3 @@ export declare const subgraphValidationFailureError: Error; | ||
export declare const invalidPublishEventResultObjectErrorMessage: string; | ||
export declare function invalidImplementedTypeError(typeName: string, invalidImplementationTypeStringByTypeName: Map<string, string>): Error; | ||
export declare function selfImplementationError(typeName: string): Error; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.invalidSubgraphNameErrorMessage = exports.subgraphValidationFailureError = exports.subgraphValidationError = exports.unexpectedParentKindErrorMessage = exports.invalidConfigurationResultFatalError = exports.invalidKeyFatalError = exports.unexpectedTypeNodeKindFatalError = exports.unexpectedDirectiveLocationError = exports.fieldTypeMergeFatalError = exports.incompatibleParentKindFatalError = exports.unexpectedKindFatalError = exports.maximumTypeNestingExceededFatalError = exports.invalidKeyDirectivesError = exports.invalidKeyDirectiveArgumentErrorMessage = exports.invalidDirectiveArgumentTypeErrorMessage = exports.duplicateDirectiveArgumentDefinitionErrorMessage = exports.unexpectedDirectiveArgumentErrorMessage = exports.undefinedRequiredArgumentsErrorMessage = exports.unexpectedDirectiveArgumentsErrorMessage = exports.invalidDirectiveLocationErrorMessage = exports.invalidDirectiveError = exports.duplicateUnionMemberError = exports.invalidRepeatedFederatedDirectiveErrorMessage = exports.invalidRepeatedDirectiveErrorMessage = exports.federationRequiredInputFieldError = exports.undefinedTypeError = exports.unresolvableFieldError = exports.undefinedDirectiveErrorMessage = exports.invalidFieldShareabilityError = exports.operationDefinitionError = exports.noDefinedUnionMembersError = exports.noBaseTypeExtensionError = exports.duplicateOperationTypeDefinitionError = exports.duplicateTypeDefinitionError = exports.duplicateValueExtensionError = exports.duplicateUnionMemberExtensionError = exports.duplicateInterfaceError = exports.duplicateInterfaceExtensionError = exports.duplicateEnumValueDefinitionError = exports.duplicateDirectiveDefinitionError = exports.duplicateFieldDefinitionError = exports.invalidSubgraphNamesError = exports.incompatibleExtensionKindsError = exports.incompatibleSharedEnumError = exports.incompatibleInputValueDefaultValuesError = exports.incompatibleChildTypesError = exports.incompatibleInputValueDefaultValueTypeError = exports.incompatibleArgumentTypesError = exports.incompatibleExtensionError = exports.minimumSubgraphRequirementError = void 0; | ||
exports.invalidPublishEventResultObjectErrorMessage = exports.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage = exports.nonEntityObjectExtensionsEventDrivenErrorMessage = exports.nonKeyFieldNamesEventDrivenErrorMessage = exports.nonExternalKeyFieldNamesEventDrivenErrorMessage = exports.invalidKeyFieldSetsEventDrivenErrorMessage = exports.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage = exports.invalidEventsDrivenMutationResponseTypeErrorMessage = exports.invalidRootTypeFieldEventsDirectivesErrorMessage = exports.invalidEventDrivenGraphError = exports.orScopesLimitError = exports.undefinedEntityInterfaceImplementationsError = exports.equivalentSourceAndTargetOverrideErrorMessage = exports.allFieldDefinitionsAreInaccessibleError = exports.noFieldDefinitionsError = exports.duplicateOverriddenFieldsError = exports.duplicateOverriddenFieldErrorMessage = exports.invalidSelectionOnUnionErrorMessage = exports.invalidInlineFragmentTypeConditionErrorMessage = exports.invalidInlineFragmentTypeConditionTypeErrorMessage = exports.unknownInlineFragmentTypeConditionErrorMessage = exports.inlineFragmentWithoutTypeConditionErrorMessage = exports.invalidInlineFragmentTypeErrorMessage = exports.unknownProvidesEntityErrorMessage = exports.duplicateFieldInFieldSetErrorMessage = exports.invalidProvidesOrRequiresDirectivesError = exports.argumentsInKeyFieldSetErrorMessage = exports.unexpectedArgumentErrorMessage = exports.undefinedObjectLikeParentError = exports.unparsableFieldSetSelectionErrorMessage = exports.unparsableFieldSetErrorMessage = exports.undefinedFieldInFieldSetErrorMessage = exports.invalidSelectionSetDefinitionErrorMessage = exports.invalidSelectionSetErrorMessage = exports.unknownTypeInFieldSetErrorMessage = exports.abstractTypeInKeyFieldSetErrorMessage = exports.inlineFragmentInFieldSetErrorMessage = exports.expectedEntityError = exports.noConcreteTypesForAbstractTypeError = exports.unexpectedObjectResponseType = exports.noQueryRootTypeError = exports.invalidArgumentsError = exports.duplicateArgumentsError = exports.invalidRequiredInputValueError = exports.unimplementedInterfaceFieldsError = exports.subgraphInvalidSyntaxError = exports.invalidRootTypeDefinitionError = exports.invalidOperationTypeDefinitionError = void 0; | ||
exports.unexpectedParentKindForChildError = exports.unexpectedParentKindErrorMessage = exports.invalidConfigurationResultFatalError = exports.invalidKeyFatalError = exports.unexpectedTypeNodeKindFatalError = exports.unexpectedDirectiveLocationError = exports.fieldTypeMergeFatalError = exports.incompatibleObjectExtensionOrphanBaseTypeError = exports.incompatibleParentKindMergeError = exports.incompatibleParentKindFatalError = exports.unexpectedKindFatalError = exports.maximumTypeNestingExceededError = exports.invalidKeyDirectivesError = exports.invalidKeyDirectiveArgumentErrorMessage = exports.invalidDirectiveArgumentTypeErrorMessage = exports.duplicateDirectiveArgumentDefinitionsErrorMessage = exports.unexpectedDirectiveArgumentErrorMessage = exports.undefinedRequiredArgumentsErrorMessage = exports.unexpectedDirectiveArgumentsErrorMessage = exports.invalidDirectiveLocationErrorMessage = exports.invalidDirectiveError = exports.duplicateUnionMemberError = exports.invalidRepeatedFederatedDirectiveErrorMessage = exports.invalidRepeatedDirectiveErrorMessage = exports.federationRequiredInputFieldError = exports.undefinedTypeError = exports.unresolvableFieldError = exports.undefinedDirectiveErrorMessage = exports.invalidFieldShareabilityError = exports.operationDefinitionError = exports.noDefinedUnionMembersError = exports.noBaseTypeExtensionError = exports.duplicateOperationTypeDefinitionError = exports.duplicateTypeDefinitionError = exports.duplicateValueExtensionError = exports.duplicateUnionMemberExtensionError = exports.duplicateInterfaceError = exports.duplicateInterfaceExtensionError = exports.duplicateEnumValueDefinitionError = exports.duplicateDirectiveDefinitionError = exports.duplicateFieldDefinitionError = exports.invalidSubgraphNamesError = exports.incompatibleExtensionKindsError = exports.incompatibleSharedEnumError = exports.incompatibleInputValueDefaultValuesError = exports.incompatibleChildTypesError = exports.incompatibleInputValueDefaultValueTypeError = exports.incompatibleArgumentTypesError = exports.incompatibleExtensionError = exports.minimumSubgraphRequirementError = void 0; | ||
exports.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage = exports.nonEntityObjectExtensionsEventDrivenErrorMessage = exports.nonKeyFieldNamesEventDrivenErrorMessage = exports.nonExternalKeyFieldNamesEventDrivenErrorMessage = exports.invalidKeyFieldSetsEventDrivenErrorMessage = exports.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage = exports.invalidEventsDrivenMutationResponseTypeErrorMessage = exports.invalidRootTypeFieldEventsDirectivesErrorMessage = exports.invalidEventDrivenGraphError = exports.orScopesLimitError = exports.undefinedEntityInterfaceImplementationsError = exports.equivalentSourceAndTargetOverrideErrorMessage = exports.allFieldDefinitionsAreInaccessibleError = exports.noFieldDefinitionsError = exports.duplicateOverriddenFieldsError = exports.duplicateOverriddenFieldErrorMessage = exports.invalidSelectionOnUnionErrorMessage = exports.invalidInlineFragmentTypeConditionErrorMessage = exports.invalidInlineFragmentTypeConditionTypeErrorMessage = exports.unknownInlineFragmentTypeConditionErrorMessage = exports.inlineFragmentWithoutTypeConditionErrorMessage = exports.invalidInlineFragmentTypeErrorMessage = exports.unknownProvidesEntityErrorMessage = exports.duplicateFieldInFieldSetErrorMessage = exports.invalidProvidesOrRequiresDirectivesError = exports.argumentsInKeyFieldSetErrorMessage = exports.unexpectedArgumentErrorMessage = exports.undefinedObjectLikeParentError = exports.unparsableFieldSetSelectionErrorMessage = exports.unparsableFieldSetErrorMessage = exports.undefinedFieldInFieldSetErrorMessage = exports.invalidSelectionSetDefinitionErrorMessage = exports.invalidSelectionSetErrorMessage = exports.unknownTypeInFieldSetErrorMessage = exports.abstractTypeInKeyFieldSetErrorMessage = exports.inlineFragmentInFieldSetErrorMessage = exports.expectedEntityError = exports.noConcreteTypesForAbstractTypeError = exports.unexpectedObjectResponseType = exports.noQueryRootTypeError = exports.invalidArgumentsError = exports.duplicateArgumentsError = exports.invalidRequiredInputValueError = exports.unimplementedInterfaceFieldsError = exports.subgraphInvalidSyntaxError = exports.invalidRootTypeDefinitionError = exports.invalidOperationTypeDefinitionError = exports.invalidSubgraphNameErrorMessage = exports.subgraphValidationFailureError = exports.subgraphValidationError = void 0; | ||
exports.selfImplementationError = exports.invalidImplementedTypeError = exports.invalidPublishEventResultObjectErrorMessage = void 0; | ||
const utils_1 = require("../ast/utils"); | ||
@@ -214,3 +215,3 @@ const graphql_1 = require("graphql"); | ||
function undefinedRequiredArgumentsErrorMessage(directiveName, hostPath, requiredArguments, missingRequiredArguments = []) { | ||
return (` The definition for the directive "${directiveName}" defines the following ` + | ||
let message = ` The definition for the directive "${directiveName}" defines the following ` + | ||
requiredArguments.length + | ||
@@ -222,17 +223,30 @@ ` required argument` + | ||
`"` + | ||
`.\n However, the same directive that is declared on "${hostPath}" does not define` + | ||
(missingRequiredArguments.length > 0 | ||
? ` the following required arguments: "${missingRequiredArguments.join('", "')}"` | ||
: ` any arguments.`)); | ||
`.\n However, the same directive that is declared on "${hostPath}" does not define`; | ||
if (missingRequiredArguments.length < 1) { | ||
return message + ` any arguments.`; | ||
} | ||
return (message + | ||
` the following required argument` + | ||
(missingRequiredArguments.length > 1 ? `s` : ``) + | ||
`: "` + | ||
missingRequiredArguments.join(string_constants_1.QUOTATION_JOIN) + | ||
`".`); | ||
} | ||
exports.undefinedRequiredArgumentsErrorMessage = undefinedRequiredArgumentsErrorMessage; | ||
function unexpectedDirectiveArgumentErrorMessage(directiveName, argumentName) { | ||
return ` The definition for the directive "${directiveName}" does not define an argument named "${argumentName}".`; | ||
function unexpectedDirectiveArgumentErrorMessage(directiveName, argumentNames) { | ||
return (` The definition for the directive "${directiveName}" does not define the following provided argument` + | ||
(argumentNames.length > 1 ? 's' : '') + | ||
`: "` + | ||
argumentNames.join(string_constants_1.QUOTATION_JOIN) + | ||
`".`); | ||
} | ||
exports.unexpectedDirectiveArgumentErrorMessage = unexpectedDirectiveArgumentErrorMessage; | ||
function duplicateDirectiveArgumentDefinitionErrorMessage(directiveName, hostPath, argumentName) { | ||
return (` The directive "${directiveName}" that is declared on "${hostPath}" ` + | ||
`defines the argument named "${argumentName}" more than once.`); | ||
function duplicateDirectiveArgumentDefinitionsErrorMessage(directiveName, hostPath, argumentNames) { | ||
return (` The directive "${directiveName}" that is declared on "${hostPath}" defines the following argument` + | ||
(argumentNames.length > 1 ? 's' : '') + | ||
` more than once: "` + | ||
argumentNames.join(string_constants_1.QUOTATION_JOIN) + | ||
`"`); | ||
} | ||
exports.duplicateDirectiveArgumentDefinitionErrorMessage = duplicateDirectiveArgumentDefinitionErrorMessage; | ||
exports.duplicateDirectiveArgumentDefinitionsErrorMessage = duplicateDirectiveArgumentDefinitionsErrorMessage; | ||
function invalidDirectiveArgumentTypeErrorMessage(required, argumentName, expectedKind, actualKind) { | ||
@@ -255,7 +269,7 @@ return (` The ${required ? 'required ' : ''}argument "${argumentName} must be type` + | ||
// Cannot use the constant for maximum type nesting or there will be a cyclical import | ||
function maximumTypeNestingExceededFatalError(path, maximumTypeNesting) { | ||
return new Error(`Fatal: The type defined at path "${path}" has more than ${maximumTypeNesting} layers of nesting,` + | ||
function maximumTypeNestingExceededError(path, maximumTypeNesting) { | ||
return new Error(` The type defined at path "${path}" has more than ${maximumTypeNesting} layers of nesting,` + | ||
` or there is a cyclical error.`); | ||
} | ||
exports.maximumTypeNestingExceededFatalError = maximumTypeNestingExceededFatalError; | ||
exports.maximumTypeNestingExceededError = maximumTypeNestingExceededError; | ||
function unexpectedKindFatalError(typeName) { | ||
@@ -270,2 +284,11 @@ return new Error(`Fatal: Unexpected type for "${typeName}"`); | ||
exports.incompatibleParentKindFatalError = incompatibleParentKindFatalError; | ||
function incompatibleParentKindMergeError(parentTypeName, expectedTypeString, actualTypeString) { | ||
return new Error(` When merging types, expected "${parentTypeName}" to be type ${expectedTypeString} but received "${actualTypeString}".`); | ||
} | ||
exports.incompatibleParentKindMergeError = incompatibleParentKindMergeError; | ||
function incompatibleObjectExtensionOrphanBaseTypeError(parentTypeName, actualTypeString) { | ||
return new Error(` When merging the object extension orphan "${parentTypeName}", expected an existing object base type` + | ||
` but received "${actualTypeString}".`); | ||
} | ||
exports.incompatibleObjectExtensionOrphanBaseTypeError = incompatibleObjectExtensionOrphanBaseTypeError; | ||
function fieldTypeMergeFatalError(fieldName) { | ||
@@ -297,2 +320,7 @@ return new Error(`Fatal: Unsuccessfully merged the cross-subgraph types of field "${fieldName}"` + | ||
exports.unexpectedParentKindErrorMessage = unexpectedParentKindErrorMessage; | ||
function unexpectedParentKindForChildError(parentTypeName, expectedTypeString, actualTypeString, childName, childTypeString) { | ||
return new Error(` Expected "${parentTypeName}" to be type ${expectedTypeString} but received "${actualTypeString}"` + | ||
` when handling child "${childName}" of type "${childTypeString}".`); | ||
} | ||
exports.unexpectedParentKindForChildError = unexpectedParentKindForChildError; | ||
function subgraphValidationError(subgraphName, errors) { | ||
@@ -415,3 +443,3 @@ return new Error(`The subgraph "${subgraphName}" could not be federated for the following reason` + | ||
` defined more than once: "` + | ||
duplicatedArguments.join(`", "`) + | ||
duplicatedArguments.join(string_constants_1.QUOTATION_JOIN) + | ||
`"\n`); | ||
@@ -648,3 +676,3 @@ } | ||
if (!data.definesDirectives) { | ||
message += ` The root field path "${fieldPath}" does not define any events directives.\n`; | ||
message += ` The root field path "${fieldPath}" does not define any valid events directives.\n`; | ||
} | ||
@@ -742,2 +770,17 @@ else { | ||
` the following definition:\n type PublishEventResult {\n success: Boolean!\n }`; | ||
function invalidImplementedTypeError(typeName, invalidImplementationTypeStringByTypeName) { | ||
let message = ` Only interfaces can be implemented. However, the type "${typeName}" attempts to implement` + | ||
`the following invalid type` + | ||
(invalidImplementationTypeStringByTypeName.size > 1 ? `s` : ``) + | ||
`:\n`; | ||
for (const [typeName, typeString] of invalidImplementationTypeStringByTypeName) { | ||
message += ` "${typeName}", which is type "${typeString}"\n`; | ||
} | ||
return new Error(message); | ||
} | ||
exports.invalidImplementedTypeError = invalidImplementedTypeError; | ||
function selfImplementationError(typeName) { | ||
return new Error(` The interface "${typeName}" must not implement itself.`); | ||
} | ||
exports.selfImplementationError = selfImplementationError; | ||
//# sourceMappingURL=errors.js.map |
@@ -72,12 +72,10 @@ "use strict"; | ||
const implementationErrorsMap = new Map(); | ||
const invalidImplementationTypeStringByTypeName = new Map(); | ||
for (const interfaceName of data.implementedInterfaceTypeNames) { | ||
interfaces.push((0, utils_1.stringToNamedTypeNode)(interfaceName)); | ||
const interfaceData = this.parentDefinitionDataByTypeName.get(interfaceName); | ||
if (!interfaceData) { | ||
this.errors.push((0, errors_1.undefinedTypeError)(interfaceName)); | ||
const implementationData = (0, utils_2.getOrThrowError)(this.parentDefinitionDataByTypeName, interfaceName, string_constants_1.PARENT_DEFINITION_DATA); | ||
if (implementationData.kind !== graphql_1.Kind.INTERFACE_TYPE_DEFINITION) { | ||
invalidImplementationTypeStringByTypeName.set(implementationData.name, (0, utils_2.kindToTypeString)(implementationData.kind)); | ||
continue; | ||
} | ||
if (interfaceData.kind !== graphql_1.Kind.INTERFACE_TYPE_DEFINITION) { | ||
throw (0, errors_1.incompatibleParentKindFatalError)(interfaceName, graphql_1.Kind.INTERFACE_TYPE_DEFINITION, interfaceData.kind); | ||
} | ||
const implementationErrors = { | ||
@@ -88,3 +86,3 @@ invalidFieldImplementations: new Map(), | ||
let hasErrors = false; | ||
for (const [fieldName, interfaceField] of interfaceData.fieldDataByFieldName) { | ||
for (const [fieldName, interfaceField] of implementationData.fieldDataByFieldName) { | ||
let hasNestedErrors = false; | ||
@@ -151,2 +149,5 @@ const fieldData = data.fieldDataByFieldName.get(fieldName); | ||
} | ||
if (invalidImplementationTypeStringByTypeName.size > 0) { | ||
this.errors.push((0, errors_1.invalidImplementedTypeError)(data.name, invalidImplementationTypeStringByTypeName)); | ||
} | ||
if (implementationErrorsMap.size) { | ||
@@ -203,4 +204,4 @@ this.errors.push((0, errors_1.unimplementedInterfaceFieldsError)(data.node.name.value, (0, utils_2.kindToTypeString)(data.kind), implementationErrorsMap)); | ||
for (const entityAncestorTypeName of entityAncestors) { | ||
const entityContainer = (0, utils_2.getOrThrowError)(this.parentDefinitionDataByTypeName, entityAncestorTypeName, 'parentDefinitionDataByTypeName'); | ||
const mutualEntityAncestorRootTypeFieldSubgraphs = (0, utils_2.getAllMutualEntries)(rootTypeFieldSubgraphs, entityContainer.subgraphNames); | ||
const entityObjectData = (0, utils_2.getOrThrowError)(this.parentDefinitionDataByTypeName, entityAncestorTypeName, 'parentDefinitionDataByTypeName'); | ||
const mutualEntityAncestorRootTypeFieldSubgraphs = (0, utils_2.getAllMutualEntries)(rootTypeFieldSubgraphs, entityObjectData.subgraphNames); | ||
const mutualEntityAncestorSubgraphsNames = (0, utils_2.getAllMutualEntries)(mutualEntityAncestorRootTypeFieldSubgraphs, objectSubgraphs); | ||
@@ -207,0 +208,0 @@ for (const mutualSubgraphName of mutualEntityAncestorSubgraphsNames) { |
@@ -46,3 +46,3 @@ import { ConstDirectiveNode, DirectiveDefinitionNode, DirectiveNode, DocumentNode, FieldDefinitionNode, GraphQLSchema, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, Kind, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, OperationTypeNode } from 'graphql'; | ||
export declare function normalizeSubgraphFromString(subgraphSDL: string): NormalizationResultContainer; | ||
export declare function normalizeSubgraph(document: DocumentNode, graph?: MultiGraph, subgraphName?: string): NormalizationResultContainer; | ||
export declare function normalizeSubgraph(document: DocumentNode, subgraphName?: string, graph?: MultiGraph): NormalizationResultContainer; | ||
export declare class NormalizationFactory { | ||
@@ -95,3 +95,3 @@ argumentName: string; | ||
extractKeyFieldSets(node: ObjectLikeTypeNode, fieldSetData: FieldSetData): void; | ||
validateInterfaceImplementations(container: ParentWithFieldsData): void; | ||
validateInterfaceImplementations(data: ParentWithFieldsData): void; | ||
handleOverrideDeclaration(node: DirectiveNode, hostPath: string, errorMessages: string[]): void; | ||
@@ -98,0 +98,0 @@ extractEventDirectivesToConfiguration(node: FieldDefinitionNode): void; |
@@ -141,9 +141,10 @@ "use strict"; | ||
nf.lastChildNodeKind = node.kind; | ||
const parent = nf.isCurrentParentExtension | ||
const parentData = nf.isCurrentParentExtension | ||
? (0, utils_1.getOrThrowError)(nf.parentExtensionDataByTypeName, nf.originalParentTypeName, string_constants_1.EXTENSIONS) | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENTS); | ||
if (parent.kind !== graphql_1.Kind.ENUM_TYPE_DEFINITION && parent.kind !== graphql_1.Kind.ENUM_TYPE_EXTENSION) { | ||
throw (0, errors_1.unexpectedKindFatalError)(nf.childName); | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENT_DEFINITION_DATA); | ||
if (parentData.kind !== graphql_1.Kind.ENUM_TYPE_DEFINITION && parentData.kind !== graphql_1.Kind.ENUM_TYPE_EXTENSION) { | ||
nf.errors.push((0, errors_1.unexpectedParentKindForChildError)(nf.originalParentTypeName, 'enum or enum extension', (0, utils_1.kindToTypeString)(parentData.kind), nf.childName, (0, utils_1.kindToTypeString)(node.kind))); | ||
return false; | ||
} | ||
if (parent.enumValueDataByValueName.has(nf.childName)) { | ||
if (parentData.enumValueDataByValueName.has(nf.childName)) { | ||
const error = nf.isCurrentParentExtension | ||
@@ -155,3 +156,3 @@ ? (0, errors_1.duplicateValueExtensionError)('enum', nf.originalParentTypeName, nf.childName) | ||
} | ||
(0, utils_4.addEnumValueDataByNode)(parent.enumValueDataByValueName, node, nf.errors, nf.directiveDefinitionByDirectiveName, nf.handledRepeatedDirectivesByHostPath, nf.originalParentTypeName); | ||
(0, utils_4.addEnumValueDataByNode)(parentData.enumValueDataByValueName, node, nf.errors, nf.directiveDefinitionByDirectiveName, nf.handledRepeatedDirectivesByHostPath, nf.originalParentTypeName); | ||
}, | ||
@@ -180,3 +181,3 @@ leave() { | ||
? (0, utils_1.getOrThrowError)(nf.parentExtensionDataByTypeName, nf.originalParentTypeName, string_constants_1.EXTENSIONS) | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENTS); | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENT_DEFINITION_DATA); | ||
if (parentData.kind !== graphql_1.Kind.OBJECT_TYPE_DEFINITION && | ||
@@ -186,3 +187,4 @@ parentData.kind !== graphql_1.Kind.OBJECT_TYPE_EXTENSION && | ||
parentData.kind !== graphql_1.Kind.INTERFACE_TYPE_EXTENSION) { | ||
throw (0, errors_1.unexpectedKindFatalError)(nf.originalParentTypeName); | ||
nf.errors.push((0, errors_1.unexpectedParentKindForChildError)(nf.originalParentTypeName, 'object, object extension, interface, or interface extension', (0, utils_1.kindToTypeString)(parentData.kind), nf.childName, (0, utils_1.kindToTypeString)(node.kind))); | ||
return false; | ||
} | ||
@@ -195,3 +197,3 @@ if (parentData.fieldDataByFieldName.has(nf.childName)) { | ||
const directivesByDirectiveName = nf.extractDirectivesAndAuthorization(node, (0, utils_4.addInheritedDirectivesToFieldData)(parentData.directivesByDirectiveName, new Map())); | ||
const fieldData = (0, utils_4.addFieldDataByNode)(parentData.fieldDataByFieldName, node, nf.errors, argumentDataByArgumentName, directivesByDirectiveName, nf.originalParentTypeName, nf.renamedParentTypeName || nf.originalParentTypeName, nf.subgraphName, nf.isSubgraphVersionTwo); | ||
const fieldData = (0, utils_4.addFieldDataByNode)(parentData.fieldDataByFieldName, node, argumentDataByArgumentName, directivesByDirectiveName, nf.originalParentTypeName, nf.renamedParentTypeName || nf.originalParentTypeName, nf.subgraphName, nf.isSubgraphVersionTwo, nf.errors); | ||
const entityContainer = nf.entityDataByTypeName.get(nf.originalParentTypeName); | ||
@@ -280,13 +282,15 @@ if (entityContainer) { | ||
} | ||
const parent = nf.isCurrentParentExtension | ||
const parentData = nf.isCurrentParentExtension | ||
? (0, utils_1.getOrThrowError)(nf.parentExtensionDataByTypeName, nf.originalParentTypeName, string_constants_1.EXTENSIONS) | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENTS); | ||
if (parent.kind !== graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION && parent.kind !== graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION) { | ||
throw (0, errors_1.unexpectedKindFatalError)(nf.originalParentTypeName); | ||
: (0, utils_1.getOrThrowError)(nf.parentDefinitionDataByTypeName, nf.originalParentTypeName, string_constants_1.PARENT_DEFINITION_DATA); | ||
if (parentData.kind !== graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION && | ||
parentData.kind !== graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION) { | ||
nf.errors.push((0, errors_1.unexpectedParentKindForChildError)(nf.originalParentTypeName, 'input object or input object extension', (0, utils_1.kindToTypeString)(parentData.kind), nf.childName, (0, utils_1.kindToTypeString)(node.kind))); | ||
return false; | ||
} | ||
if (parent.inputValueDataByValueName.has(name)) { | ||
if (parentData.inputValueDataByValueName.has(name)) { | ||
nf.errors.push((0, errors_1.duplicateValueExtensionError)('input', nf.originalParentTypeName, name)); | ||
return; | ||
} | ||
(0, utils_4.addInputValueDataByNode)(parent.inputValueDataByValueName, node, nf.directiveDefinitionByDirectiveName, nf.handledRepeatedDirectivesByHostPath, valuePath, nf.subgraphName, nf.errors); | ||
(0, utils_4.addInputValueDataByNode)(parentData.inputValueDataByValueName, node, nf.directiveDefinitionByDirectiveName, nf.handledRepeatedDirectivesByHostPath, valuePath, nf.subgraphName, nf.errors); | ||
}, | ||
@@ -293,0 +297,0 @@ leave() { |
@@ -34,3 +34,3 @@ import { ConstDirectiveNode, ConstValueNode, DirectiveDefinitionNode, EnumTypeDefinitionNode, EnumValueDefinitionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputValueDefinitionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, Kind, NamedTypeNode, NameNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, ScalarTypeDefinitionNode, StringValueNode, TypeNode, UnionTypeDefinitionNode } from 'graphql'; | ||
}; | ||
export declare function getMutableFieldNode(node: FieldDefinitionNode, hostPath: string): MutableFieldNode; | ||
export declare function getMutableFieldNode(node: FieldDefinitionNode, hostPath: string, errors: Error[]): MutableFieldNode; | ||
export type MutableInputObjectNode = { | ||
@@ -52,3 +52,3 @@ kind: Kind.INPUT_OBJECT_TYPE_DEFINITION; | ||
}; | ||
export declare function getMutableInputValueNode(node: InputValueDefinitionNode, hostPath: string): MutableInputValueNode; | ||
export declare function getMutableInputValueNode(node: InputValueDefinitionNode, hostPath: string, errors: Error[]): MutableInputValueNode; | ||
export type MutableInterfaceNode = { | ||
@@ -106,3 +106,3 @@ kind: Kind.INTERFACE_TYPE_DEFINITION; | ||
}; | ||
export declare function getMutableTypeNode(node: TypeNode, typePath: string): MutableTypeNode; | ||
export declare function getMutableTypeNode(node: TypeNode, typePath: string, errors: Error[]): MutableTypeNode; | ||
export type MutableUnionNode = { | ||
@@ -116,5 +116,4 @@ kind: Kind.UNION_TYPE_DEFINITION; | ||
export declare function getMutableUnionNode(node: UnionTypeDefinitionNode): MutableUnionNode; | ||
export declare function deepCopyTypeNode(node: TypeNode, hostPath: string): TypeNode; | ||
export type MutableTypeDefinitionNode = MutableDirectiveDefinitionNode | MutableEnumNode | MutableInputObjectNode | MutableInterfaceNode | MutableObjectNode | MutableScalarNode | MutableUnionNode; | ||
export type ObjectLikeTypeNode = InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode | ObjectTypeExtensionNode; | ||
export declare function getTypeNodeNamedTypeName(typeNode: TypeNode): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTypeNodeNamedTypeName = exports.deepCopyTypeNode = exports.getMutableUnionNode = exports.getMutableTypeNode = exports.getMutableScalarNode = exports.getMutableObjectExtensionNode = exports.getMutableObjectNode = exports.getMutableInterfaceNode = exports.getMutableInputValueNode = exports.getMutableInputObjectNode = exports.getMutableFieldNode = exports.getMutableEnumValueNode = exports.getMutableEnumNode = exports.getMutableDirectiveDefinitionNode = void 0; | ||
exports.getTypeNodeNamedTypeName = exports.getMutableUnionNode = exports.getMutableTypeNode = exports.getMutableScalarNode = exports.getMutableObjectExtensionNode = exports.getMutableObjectNode = exports.getMutableInterfaceNode = exports.getMutableInputValueNode = exports.getMutableInputObjectNode = exports.getMutableFieldNode = exports.getMutableEnumValueNode = exports.getMutableEnumNode = exports.getMutableDirectiveDefinitionNode = void 0; | ||
const graphql_1 = require("graphql"); | ||
@@ -37,3 +37,3 @@ const utils_1 = require("../ast/utils"); | ||
exports.getMutableEnumValueNode = getMutableEnumValueNode; | ||
function getMutableFieldNode(node, hostPath) { | ||
function getMutableFieldNode(node, hostPath, errors) { | ||
return { | ||
@@ -44,3 +44,3 @@ arguments: [], | ||
name: { ...node.name }, | ||
type: deepCopyTypeNode(node.type, hostPath), | ||
type: getMutableTypeNode(node.type, hostPath, errors), | ||
description: (0, utils_1.formatDescription)(node.description), | ||
@@ -58,3 +58,3 @@ }; | ||
exports.getMutableInputObjectNode = getMutableInputObjectNode; | ||
function getMutableInputValueNode(node, hostPath) { | ||
function getMutableInputValueNode(node, hostPath, errors) { | ||
return { | ||
@@ -64,3 +64,3 @@ directives: [], | ||
name: { ...node.name }, | ||
type: deepCopyTypeNode(node.type, hostPath), | ||
type: getMutableTypeNode(node.type, hostPath, errors), | ||
defaultValue: node.defaultValue, | ||
@@ -104,3 +104,3 @@ description: (0, utils_1.formatDescription)(node.description), | ||
exports.getMutableScalarNode = getMutableScalarNode; | ||
function getMutableTypeNode(node, typePath) { | ||
function getMutableTypeNode(node, typePath, errors) { | ||
const deepCopy = { kind: node.kind }; | ||
@@ -129,3 +129,5 @@ let lastTypeNode = deepCopy; | ||
} | ||
throw (0, errors_1.maximumTypeNestingExceededFatalError)(typePath, constants_1.MAXIMUM_TYPE_NESTING); | ||
errors.push((0, errors_1.maximumTypeNestingExceededError)(typePath, constants_1.MAXIMUM_TYPE_NESTING)); | ||
// Return a dummy type when the type has exceeded nesting | ||
return { kind: graphql_1.Kind.NAMED_TYPE, name: (0, utils_1.stringToNameNode)(getTypeNodeNamedTypeName(node)) }; | ||
} | ||
@@ -141,27 +143,2 @@ exports.getMutableTypeNode = getMutableTypeNode; | ||
exports.getMutableUnionNode = getMutableUnionNode; | ||
function deepCopyTypeNode(node, hostPath) { | ||
const deepCopy = { kind: node.kind }; | ||
let lastTypeNode = deepCopy; | ||
for (let i = 0; i < constants_1.MAXIMUM_TYPE_NESTING; i++) { | ||
switch (node.kind) { | ||
case graphql_1.Kind.NAMED_TYPE: | ||
lastTypeNode.name = { ...node.name }; | ||
return deepCopy; | ||
case graphql_1.Kind.LIST_TYPE: | ||
lastTypeNode.kind = node.kind; | ||
lastTypeNode.type = { kind: node.type.kind }; | ||
lastTypeNode = lastTypeNode.type; | ||
node = node.type; | ||
continue; | ||
case graphql_1.Kind.NON_NULL_TYPE: | ||
lastTypeNode.kind = node.kind; | ||
lastTypeNode.type = { kind: node.type.kind }; | ||
lastTypeNode = lastTypeNode.type; | ||
node = node.type; | ||
continue; | ||
} | ||
} | ||
throw (0, errors_1.maximumTypeNestingExceededFatalError)(hostPath, constants_1.MAXIMUM_TYPE_NESTING); | ||
} | ||
exports.deepCopyTypeNode = deepCopyTypeNode; | ||
function getTypeNodeNamedTypeName(typeNode) { | ||
@@ -168,0 +145,0 @@ switch (typeNode.kind) { |
@@ -6,3 +6,3 @@ import { TypeNode } from 'graphql'; | ||
}; | ||
export declare function getLeastRestrictiveMergedTypeNode(current: TypeNode, other: TypeNode, hostPath: string): MergedTypeResult; | ||
export declare function getMostRestrictiveMergedTypeNode(current: TypeNode, other: TypeNode, hostPath: string): MergedTypeResult; | ||
export declare function getLeastRestrictiveMergedTypeNode(current: TypeNode, other: TypeNode, hostPath: string, errors: Error[]): MergedTypeResult; | ||
export declare function getMostRestrictiveMergedTypeNode(current: TypeNode, other: TypeNode, hostPath: string, errors: Error[]): MergedTypeResult; |
@@ -14,4 +14,4 @@ "use strict"; | ||
})(DivergentType || (DivergentType = {})); | ||
function getMergedTypeNode(current, other, hostPath, mostRestrictive) { | ||
other = (0, ast_1.deepCopyTypeNode)(other, hostPath); // current is already a deep copy | ||
function getMergedTypeNode(current, other, hostPath, mostRestrictive, errors) { | ||
other = (0, ast_1.getMutableTypeNode)(other, hostPath, errors); // current is already a deep copy | ||
// The first type of the pair to diverge in restriction takes precedence in all future differences. | ||
@@ -85,12 +85,13 @@ // If the other type of the pair also diverges, it's a src error. | ||
} | ||
throw (0, errors_1.maximumTypeNestingExceededFatalError)(hostPath, constants_1.MAXIMUM_TYPE_NESTING); | ||
errors.push((0, errors_1.maximumTypeNestingExceededError)(hostPath, constants_1.MAXIMUM_TYPE_NESTING)); | ||
return { typeNode: current }; | ||
} | ||
function getLeastRestrictiveMergedTypeNode(current, other, hostPath) { | ||
return getMergedTypeNode(current, other, hostPath, false); | ||
function getLeastRestrictiveMergedTypeNode(current, other, hostPath, errors) { | ||
return getMergedTypeNode(current, other, hostPath, false, errors); | ||
} | ||
exports.getLeastRestrictiveMergedTypeNode = getLeastRestrictiveMergedTypeNode; | ||
function getMostRestrictiveMergedTypeNode(current, other, hostPath) { | ||
return getMergedTypeNode(current, other, hostPath, true); | ||
function getMostRestrictiveMergedTypeNode(current, other, hostPath, errors) { | ||
return getMergedTypeNode(current, other, hostPath, true, errors); | ||
} | ||
exports.getMostRestrictiveMergedTypeNode = getMostRestrictiveMergedTypeNode; | ||
//# sourceMappingURL=type-merging.js.map |
@@ -23,3 +23,3 @@ import { ConstDirectiveNode, DirectiveDefinitionNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, EnumValueDefinitionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InputValueDefinitionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, Kind, NamedTypeNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, OperationTypeNode, ScalarTypeDefinitionNode, ScalarTypeExtensionNode, SchemaDefinitionNode, TypeNode, UnionTypeDefinitionNode, UnionTypeExtensionNode } from 'graphql'; | ||
export declare function addInheritedDirectivesToFieldData(parentDirectivesByDirectiveName: Map<string, ConstDirectiveNode[]>, fieldDirectivesByDirectiveName: Map<string, ConstDirectiveNode[]>): Map<string, ConstDirectiveNode[]>; | ||
export declare function addFieldDataByNode(fieldDataByFieldName: Map<string, FieldData>, node: FieldDefinitionNode, errors: Error[], argumentDataByArgumentName: Map<string, InputValueData>, directivesByDirectiveName: Map<string, ConstDirectiveNode[]>, originalParentTypeName: string, renamedParentTypeName: string, subgraphName: string, isSubgraphVersionTwo: boolean): FieldData; | ||
export declare function addFieldDataByNode(fieldDataByFieldName: Map<string, FieldData>, node: FieldDefinitionNode, argumentDataByArgumentName: Map<string, InputValueData>, directivesByDirectiveName: Map<string, ConstDirectiveNode[]>, originalParentTypeName: string, renamedParentTypeName: string, subgraphName: string, isSubgraphVersionTwo: boolean, errors: Error[]): FieldData; | ||
export declare function addExtensionWithFieldsDataByNode(parentExtensionDataByTypeName: Map<string, ParentExtensionData>, node: InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode | ObjectTypeExtensionNode, errors: Error[], directiveDefinitionByDirectiveName: Map<string, DirectiveDefinitionNode>, handledRepeatedDirectivesByHostPath: Map<string, Set<string>>, isEntity: boolean, isRootType: boolean, subgraphName: string, renamedTypeName?: string): void; | ||
@@ -26,0 +26,0 @@ export declare function addInputObjectDefinitionDataByNode(parentDefinitionDataByTypeName: Map<string, ParentDefinitionData>, node: InputObjectTypeDefinitionNode, directiveDefinitionByDirectiveName: Map<string, DirectiveDefinitionNode>, handledRepeatedDirectivesByHostPath: Map<string, Set<string>>, subgraphName: string, errors: Error[]): void; |
@@ -55,6 +55,7 @@ export declare const ANY_SCALAR = "_Any"; | ||
export declare const OVERRIDE = "override"; | ||
export declare const PARENTS = "parents"; | ||
export declare const PARENT_DEFINITION_DATA = "parentDefinitionDataByTypeName"; | ||
export declare const PARENT_DEFINITION_DATA_MAP = "parentDefinitionDataByParentTypeName"; | ||
export declare const PARENT_EXTENSION_DATA_MAP = "parentExtensionDataByParentTypeName"; | ||
export declare const PROVIDES = "provides"; | ||
export declare const PUBLISH = "publish"; | ||
export declare const PUBLISH_EVENT_RESULT = "PublishEventResult"; | ||
@@ -65,2 +66,3 @@ export declare const QUERY = "Query"; | ||
export declare const REASON = "reason"; | ||
export declare const REQUEST = "request"; | ||
export declare const REQUIRES = "requires"; | ||
@@ -82,2 +84,3 @@ export declare const REQUIRES_SCOPES = "requiresScopes"; | ||
export declare const SUBSCRIPTION = "Subscription"; | ||
export declare const SUBSCRIBE = "subscribe"; | ||
export declare const SUBSCRIPTION_UPPER = "SUBSCRIPTION"; | ||
@@ -84,0 +87,0 @@ export declare const SUCCESS = "success"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NON_NULLABLE_PUBLISH_EVENT_RESULT = exports.NAME = exports.N_A = exports.MUTATION_UPPER = exports.MUTATION = exports.KEY = exports.LINK = exports.INTERFACE_OBJECT = exports.INTERFACE_UPPER = exports.INT_SCALAR = exports.INPUT_OBJECT_UPPER = exports.INPUT_OBJECT = exports.INPUT_FIELD_DEFINITION_UPPER = exports.INPUT_FIELD = exports.INLINE_FRAGMENT_UPPER = exports.INLINE_FRAGMENT = exports.INACCESSIBLE = exports.FROM = exports.FRAGMENT_SPREAD_UPPER = exports.FRAGMENT_DEFINITION_UPPER = exports.FLOAT_SCALAR = exports.FIELD_DEFINITION_UPPER = exports.FIELDS = exports.FIELD_SET_SCALAR = exports.FIELD_UPPER = exports.FIELD = exports.EXTENSIONS = exports.EXTENDS = exports.EXTERNAL = exports.EVENTS_SUBSCRIBE = exports.EVENTS_REQUEST = exports.EVENTS_PUBLISH = exports.ENUM_VALUE_UPPER = exports.ENUM_UPPER = exports.ENTITY_UNION = exports.ENTITIES_FIELD = exports.ENTITIES = exports.DIRECTIVE_DEFINITION = exports.DEPRECATED_DEFAULT_ARGUMENT_VALUE = exports.DEPRECATED = exports.DEFAULT_SUBSCRIPTION = exports.DEFAULT_QUERY = exports.DEFAULT_MUTATION = exports.DEFAULT = exports.COMPOSE_DIRECTIVE = exports.BOOLEAN_SCALAR = exports.ARGUMENT_DEFINITION_UPPER = exports.AUTHENTICATED = exports.ARGUMENT = exports.ANY_SCALAR = void 0; | ||
exports.EVENT_DIRECTIVE_NAMES = exports.ROOT_TYPES = exports.IGNORED_PARENT_DIRECTIVES = exports.EXECUTABLE_DIRECTIVE_LOCATIONS = exports.VARIABLE_DEFINITION_UPPER = exports.URL_LOWER = exports.UNION_UPPER = exports.UNION = exports.TOPIC = exports.TAG = exports.SUCCESS = exports.SUBSCRIPTION_UPPER = exports.SUBSCRIPTION = exports.STRING_SCALAR = exports.SPECIFIED_BY = exports.SOURCE_NAME = exports.SHAREABLE = exports.SERVICE_FIELD = exports.SERVICE_OBJECT = exports.SELECTION_REPRESENTATION = exports.SCOPE_SCALAR = exports.SCOPES = exports.SCHEMA_UPPER = exports.SCHEMA = exports.SCALAR_UPPER = exports.RESOLVABLE = exports.REQUIRES_SCOPES = exports.REQUIRES = exports.REASON = exports.QUOTATION_JOIN = exports.QUERY_UPPER = exports.QUERY = exports.PUBLISH_EVENT_RESULT = exports.PROVIDES = exports.PARENT_EXTENSION_DATA_MAP = exports.PARENT_DEFINITION_DATA_MAP = exports.PARENTS = exports.OVERRIDE = exports.OBJECT_UPPER = exports.OPERATION_TO_DEFAULT = exports.NON_NULLABLE_BOOLEAN = void 0; | ||
exports.EVENT_DIRECTIVE_NAMES = exports.ROOT_TYPES = exports.IGNORED_PARENT_DIRECTIVES = exports.EXECUTABLE_DIRECTIVE_LOCATIONS = exports.VARIABLE_DEFINITION_UPPER = exports.URL_LOWER = exports.UNION_UPPER = exports.UNION = exports.TOPIC = exports.TAG = exports.SUCCESS = exports.SUBSCRIPTION_UPPER = exports.SUBSCRIBE = exports.SUBSCRIPTION = exports.STRING_SCALAR = exports.SPECIFIED_BY = exports.SOURCE_NAME = exports.SHAREABLE = exports.SERVICE_FIELD = exports.SERVICE_OBJECT = exports.SELECTION_REPRESENTATION = exports.SCOPE_SCALAR = exports.SCOPES = exports.SCHEMA_UPPER = exports.SCHEMA = exports.SCALAR_UPPER = exports.RESOLVABLE = exports.REQUIRES_SCOPES = exports.REQUIRES = exports.REQUEST = exports.REASON = exports.QUOTATION_JOIN = exports.QUERY_UPPER = exports.QUERY = exports.PUBLISH_EVENT_RESULT = exports.PUBLISH = exports.PROVIDES = exports.PARENT_EXTENSION_DATA_MAP = exports.PARENT_DEFINITION_DATA_MAP = exports.PARENT_DEFINITION_DATA = exports.OVERRIDE = exports.OBJECT_UPPER = exports.OPERATION_TO_DEFAULT = exports.NON_NULLABLE_BOOLEAN = void 0; | ||
exports.ANY_SCALAR = '_Any'; | ||
@@ -59,6 +59,7 @@ exports.ARGUMENT = 'argument'; | ||
exports.OVERRIDE = 'override'; | ||
exports.PARENTS = 'parents'; | ||
exports.PARENT_DEFINITION_DATA = 'parentDefinitionDataByTypeName'; | ||
exports.PARENT_DEFINITION_DATA_MAP = 'parentDefinitionDataByParentTypeName'; | ||
exports.PARENT_EXTENSION_DATA_MAP = 'parentExtensionDataByParentTypeName'; | ||
exports.PROVIDES = 'provides'; | ||
exports.PUBLISH = 'publish'; | ||
exports.PUBLISH_EVENT_RESULT = 'PublishEventResult'; | ||
@@ -69,2 +70,3 @@ exports.QUERY = 'Query'; | ||
exports.REASON = 'reason'; | ||
exports.REQUEST = 'request'; | ||
exports.REQUIRES = 'requires'; | ||
@@ -86,2 +88,3 @@ exports.REQUIRES_SCOPES = 'requiresScopes'; | ||
exports.SUBSCRIPTION = 'Subscription'; | ||
exports.SUBSCRIBE = 'subscribe'; | ||
exports.SUBSCRIPTION_UPPER = 'SUBSCRIPTION'; | ||
@@ -88,0 +91,0 @@ exports.SUCCESS = 'success'; |
{ | ||
"name": "@wundergraph/composition", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"author": { | ||
@@ -33,3 +33,3 @@ "name": "WunderGraph Maintainers", | ||
"pathe": "^1.1.1", | ||
"vitest": "^0.34.1" | ||
"vitest": "^1.4.0" | ||
}, | ||
@@ -40,3 +40,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "1ad9a19ca38b657f1e8230e7d6b5ccf8e0f84bac" | ||
"gitHead": "fc3aaba5b38bffc60dfc4b1ca5f46e86eef041be" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
833415
8999
+ Added@vitest/expect@1.6.0(transitive)
+ Added@vitest/runner@1.6.0(transitive)
+ Added@vitest/snapshot@1.6.0(transitive)
+ Added@vitest/spy@1.6.0(transitive)
+ Added@vitest/utils@1.6.0(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedestree-walker@3.0.3(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-tokens@9.0.1(transitive)
+ Addedlocal-pkg@0.5.1(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedp-limit@5.0.0(transitive)
+ Addedpath-key@3.1.14.0.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedstrip-literal@2.1.1(transitive)
+ Addedtinypool@0.8.4(transitive)
+ Addedvite-node@1.6.0(transitive)
+ Addedvitest@1.6.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@types/chai@4.3.20(transitive)
- Removed@types/chai-subset@1.3.5(transitive)
- Removed@types/node@22.10.2(transitive)
- Removed@vitest/expect@0.34.6(transitive)
- Removed@vitest/runner@0.34.6(transitive)
- Removed@vitest/snapshot@0.34.6(transitive)
- Removed@vitest/spy@0.34.6(transitive)
- Removed@vitest/utils@0.34.6(transitive)
- Removedlocal-pkg@0.4.3(transitive)
- Removedp-limit@4.0.0(transitive)
- Removedstrip-literal@1.3.0(transitive)
- Removedtinypool@0.7.0(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedvite-node@0.34.6(transitive)
- Removedvitest@0.34.6(transitive)
Updatedvitest@^1.4.0