@wundergraph/composition 0.28.3 → 0.28.5

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.
Files changed (42) hide show
  1. package/dist/ast/utils.d.ts +2 -3
  2. package/dist/ast/utils.js +0 -17
  3. package/dist/ast/utils.js.map +1 -1
  4. package/dist/errors/errors.d.ts +13 -11
  5. package/dist/errors/errors.js +64 -55
  6. package/dist/errors/errors.js.map +1 -1
  7. package/dist/federation/federation-factory.d.ts +2 -5
  8. package/dist/federation/federation-factory.js +28 -130
  9. package/dist/federation/federation-factory.js.map +1 -1
  10. package/dist/federation/utils.d.ts +4 -6
  11. package/dist/federation/utils.js +4 -5
  12. package/dist/federation/utils.js.map +1 -1
  13. package/dist/federation/walkers.js +3 -3
  14. package/dist/federation/walkers.js.map +1 -1
  15. package/dist/normalization/normalization-factory.d.ts +23 -13
  16. package/dist/normalization/normalization-factory.js +347 -218
  17. package/dist/normalization/normalization-factory.js.map +1 -1
  18. package/dist/normalization/utils.js +9 -13
  19. package/dist/normalization/utils.js.map +1 -1
  20. package/dist/normalization/walkers.js +51 -175
  21. package/dist/normalization/walkers.js.map +1 -1
  22. package/dist/schema-building/ast.d.ts +8 -8
  23. package/dist/schema-building/ast.js +18 -25
  24. package/dist/schema-building/ast.js.map +1 -1
  25. package/dist/schema-building/type-definition-data.d.ts +13 -2
  26. package/dist/schema-building/type-definition-data.js +7 -0
  27. package/dist/schema-building/type-definition-data.js.map +1 -1
  28. package/dist/schema-building/utils.d.ts +11 -23
  29. package/dist/schema-building/utils.js +37 -287
  30. package/dist/schema-building/utils.js.map +1 -1
  31. package/dist/subgraph/subgraph.d.ts +0 -2
  32. package/dist/subgraph/subgraph.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/utils/string-constants.d.ts +12 -7
  35. package/dist/utils/string-constants.js +16 -11
  36. package/dist/utils/string-constants.js.map +1 -1
  37. package/dist/utils/utils.d.ts +1 -0
  38. package/dist/utils/utils.js +83 -18
  39. package/dist/utils/utils.js.map +1 -1
  40. package/dist/warnings/warnings.js +2 -2
  41. package/dist/warnings/warnings.js.map +1 -1
  42. package/package.json +2 -2
@@ -1,9 +1,8 @@
1
1
  import { ArgumentNode, DocumentNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, FieldNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, Kind, NamedTypeNode, NameNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, OperationTypeNode, ScalarTypeDefinitionNode, ScalarTypeExtensionNode, SchemaDefinitionNode, SchemaExtensionNode, SelectionSetNode, StringValueNode, UnionTypeDefinitionNode, UnionTypeExtensionNode } from 'graphql';
2
- import { ObjectLikeTypeNode } from '../schema-building/ast';
3
- export declare function isObjectLikeNodeEntity(node: ObjectLikeTypeNode): boolean;
2
+ import { CompositeOutputNode } from '../schema-building/ast';
3
+ export declare function isObjectLikeNodeEntity(node: CompositeOutputNode): boolean;
4
4
  export declare function isNodeInterfaceObject(node: ObjectTypeDefinitionNode): boolean;
5
5
  export declare function isNodeExtension(node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): boolean;
6
- export declare function extractInterfaces(node: InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode | ObjectTypeExtensionNode, interfaces: Set<string>, errors?: Error[]): Set<string>;
7
6
  export declare function areBaseAndExtensionKindsCompatible(baseKind: Kind, extensionKind: Kind, typeName: string): boolean;
8
7
  export declare function stringToNameNode(value: string): NameNode;
9
8
  export declare function stringArrayToNameNodeArray(values: string[]): NameNode[];
package/dist/ast/utils.js CHANGED
@@ -4,7 +4,6 @@ exports.operationTypeNodeToDefaultType = void 0;
4
4
  exports.isObjectLikeNodeEntity = isObjectLikeNodeEntity;
5
5
  exports.isNodeInterfaceObject = isNodeInterfaceObject;
6
6
  exports.isNodeExtension = isNodeExtension;
7
- exports.extractInterfaces = extractInterfaces;
8
7
  exports.areBaseAndExtensionKindsCompatible = areBaseAndExtensionKindsCompatible;
9
8
  exports.stringToNameNode = stringToNameNode;
10
9
  exports.stringArrayToNameNodeArray = stringArrayToNameNodeArray;
@@ -22,7 +21,6 @@ exports.parse = parse;
22
21
  exports.safeParse = safeParse;
23
22
  const graphql_1 = require("graphql");
24
23
  const string_constants_1 = require("../utils/string-constants");
25
- const errors_1 = require("../errors/errors");
26
24
  function isObjectLikeNodeEntity(node) {
27
25
  if (!node.directives?.length) {
28
26
  return false;
@@ -56,21 +54,6 @@ function isNodeExtension(node) {
56
54
  }
57
55
  return false;
58
56
  }
59
- function extractInterfaces(node, interfaces, errors) {
60
- if (!node.interfaces) {
61
- return interfaces;
62
- }
63
- const parentTypeName = node.name.value;
64
- for (const face of node.interfaces) {
65
- const name = face.name.value;
66
- if (errors && interfaces.has(name)) {
67
- errors.push((0, errors_1.duplicateInterfaceError)(name, parentTypeName));
68
- continue;
69
- }
70
- interfaces.add(name);
71
- }
72
- return interfaces;
73
- }
74
57
  function areBaseAndExtensionKindsCompatible(baseKind, extensionKind, typeName) {
75
58
  switch (baseKind) {
76
59
  case graphql_1.Kind.ENUM_TYPE_DEFINITION:
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":";;;AAoDA,wDAUC;AACD,sDAUC;AAED,0CAUC;AAED,8CAkBC;AAED,gFAiBC;AAED,4CAKC;AAED,gEAMC;AAED,gDAMC;AAED,sDAKC;AAED,0DAMC;AAED,kEA+CC;AAQD,wCAEC;AAED,kFAWC;AAED,8CAYC;AAED,gFAMC;AAED,sFAcC;AAED,8EAaC;AAOD,sBAEC;AAED,8BAOC;AAjTD,qCAyBiB;AACjB,gEAsBmC;AACnC,6CAA2D;AAG3D,SAAgB,sBAAsB,CAAC,IAAwB;IAC7D,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAC7B,OAAO,KAA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aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACnB,GAAG,SAAS;YACZ,SAAS,EAAE,kCAAkC,CAAC,SAAS,CAAC;YACxD,YAAY,EAAE,SAAS,CAAC,YAAY;gBAClC,CAAC,CAAC,qCAAqC,CAAC,SAAS,CAAC,YAAY,CAAC;gBAC/D,CAAC,CAAC,SAAS,CAAC,YAAY;SAC3B,CAAC,CAAC;KACN,CAAC;AACJ,CAAC;AAED,SAAgB,iCAAiC,CAAC,YAA0B;IAC1E,OAAO;QACL,GAAG,YAAY;QACf,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;YACvD,IAAI,UAAU,CAAC,IAAI,KAAK,cAAI,CAAC,oBAAoB,EAAE,CAAC;gBAClD,OAAO,UAAU,CAAC;YACpB,CAAC;YACD,OAAO;gBACL,GAAG,UAAU;gBACb,YAAY,EAAE,qCAAqC,CAAC,UAAU,CAAC,YAAY,CAAC;aAC7E,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC;AAOD,SAAgB,KAAK,CAAC,MAAc;IAClC,OAAO,IAAA,eAAY,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,SAAS,CAAC,KAAa;IACrC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACjC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IACvC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,KAAK,EAAE,CAAU,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -5,6 +5,7 @@ import { InvalidRootTypeFieldEventsDirectiveData } from './utils';
5
5
  import { UnresolvableFieldData } from '../resolvability-graph/utils';
6
6
  import { FieldSetDirective } from '../schema-building/utils';
7
7
  export declare const minimumSubgraphRequirementError: Error;
8
+ export declare function multipleNamedTypeDefinitionError(typeName: string, firstTypeString: string, secondTypeString: string): Error;
8
9
  export declare function incompatibleExtensionError(typeName: string, baseKind: Kind, extensionKind: Kind): Error;
9
10
  export declare function incompatibleArgumentTypesError(argName: string, hostPath: string, expectedType: string, actualType: string): Error;
10
11
  export declare function incompatibleInputValueDefaultValueTypeError(prefix: string, path: string, typeString: string, defaultValue: string): Error;
@@ -13,24 +14,24 @@ export declare function incompatibleInputValueDefaultValuesError(prefix: string,
13
14
  export declare function incompatibleSharedEnumError(parentName: string): Error;
14
15
  export declare function incompatibleExtensionKindsError(node: TypeDefinitionNode | TypeExtensionNode | SchemaExtensionNode, existingKind: Kind): Error;
15
16
  export declare function invalidSubgraphNamesError(names: string[], invalidNameErrorMessages: string[]): Error;
16
- export declare function duplicateFieldDefinitionError(fieldName: string, typeName: string): Error;
17
17
  export declare function duplicateDirectiveDefinitionError(directiveName: string): Error;
18
- export declare function duplicateEnumValueDefinitionError(valueName: string, typeName: string): Error;
19
- export declare function duplicateInterfaceExtensionError(interfaceName: string, typeName: string): Error;
20
- export declare function duplicateInterfaceError(interfaceName: string, typeName: string): Error;
21
- export declare function duplicateUnionMemberExtensionError(memberName: string, typeName: string): Error;
22
- export declare function duplicateValueExtensionError(parentType: string, typeName: string, childName: string): Error;
18
+ export declare function duplicateEnumValueDefinitionError(enumTypeName: string, valueName: string): Error;
19
+ export declare function duplicateFieldDefinitionError(typeString: string, typeName: string, fieldName: string): Error;
20
+ export declare function duplicateInputFieldDefinitionError(inputObjectTypeName: string, fieldName: string): Error;
21
+ export declare function duplicateImplementedInterfaceError(typeString: string, typeName: string, interfaceName: string): Error;
22
+ export declare function duplicateUnionMemberDefinitionError(unionTypeName: string, memberName: string): Error;
23
23
  export declare function duplicateTypeDefinitionError(type: string, typeName: string): Error;
24
24
  export declare function duplicateOperationTypeDefinitionError(operationTypeName: OperationTypeNode, newTypeName: string, oldTypeName: string): Error;
25
- export declare function noBaseTypeExtensionError(typeName: string): Error;
26
- export declare function noDefinedUnionMembersError(unionTypeName: string, extension?: boolean): Error;
25
+ export declare function noBaseDefinitionForExtensionError(typeString: string, typeName: string): Error;
26
+ export declare function noBaseScalarDefinitionError(typeName: string): Error;
27
+ export declare function noDefinedUnionMembersError(unionTypeName: string): Error;
28
+ export declare function noDefinedEnumValuesError(enumTypeName: string): Error;
27
29
  export declare function operationDefinitionError(typeName: string, operationType: OperationTypeNode, actualType: Kind): Error;
28
30
  export declare function invalidFieldShareabilityError(objectData: ObjectDefinitionData, invalidFieldNames: Set<string>): Error;
29
31
  export declare function undefinedDirectiveErrorMessage(directiveName: string, hostPath: string): string;
30
32
  export declare function undefinedTypeError(typeName: string): Error;
31
33
  export declare function invalidRepeatedDirectiveErrorMessage(directiveName: string, hostPath: string): string;
32
34
  export declare function invalidRepeatedFederatedDirectiveErrorMessage(directiveName: string, hostPath: string): Error;
33
- export declare function duplicateUnionMemberError(memberTypeName: string, unionTypeName: string): Error;
34
35
  export declare function invalidDirectiveError(directiveName: string, hostPath: string, errorMessages: string[]): Error;
35
36
  export declare function invalidDirectiveLocationErrorMessage(hostPath: string, kind: Kind, directiveName: string): string;
36
37
  export declare function unexpectedDirectiveArgumentsErrorMessage(directive: ConstDirectiveNode, hostPath: string): string;
@@ -45,7 +46,6 @@ export declare function unexpectedKindFatalError(typeName: string): Error;
45
46
  export declare function incompatibleParentKindFatalError(parentTypeName: string, expectedKind: Kind, actualKind: Kind): Error;
46
47
  export declare function unexpectedEdgeFatalError(typeName: string, edgeNames: Array<string>): Error;
47
48
  export declare function incompatibleParentKindMergeError(parentTypeName: string, expectedTypeString: string, actualTypeString: string): Error;
48
- export declare function incompatibleObjectExtensionOrphanBaseTypeError(parentTypeName: string, actualTypeString: string): Error;
49
49
  export declare function fieldTypeMergeFatalError(fieldName: string): Error;
50
50
  export declare function unexpectedDirectiveLocationError(locationName: string): Error;
51
51
  export declare function unexpectedTypeNodeKindFatalError(typePath: string): Error;
@@ -91,6 +91,7 @@ export declare function invalidSelectionOnUnionErrorMessage(fieldSet: string, fi
91
91
  export declare function duplicateOverriddenFieldErrorMessage(fieldPath: string, subgraphNames: string[]): string;
92
92
  export declare function duplicateOverriddenFieldsError(errorMessages: string[]): Error;
93
93
  export declare function noFieldDefinitionsError(typeString: string, typeName: string): Error;
94
+ export declare function noInputValueDefinitionsError(inputTypeName: string): Error;
94
95
  export declare function allChildDefinitionsAreInaccessibleError(typeString: string, typeName: string, childType: string): Error;
95
96
  export declare function equivalentSourceAndTargetOverrideErrorMessage(subgraphName: string, hostPath: string): string;
96
97
  export declare function undefinedEntityInterfaceImplementationsError(invalidEntityInterfacesByTypeName: Map<string, InvalidEntityInterface[]>, entityInterfaceFederationDataByTypeName: Map<string, EntityInterfaceFederationData>): Error;
@@ -123,6 +124,7 @@ export declare function invalidUnionMemberTypeError(typeName: string, invalidMem
123
124
  export declare function invalidRootTypeError(typeName: string): Error;
124
125
  export declare function invalidSubscriptionFilterLocationError(path: string): Error;
125
126
  export declare function invalidSubscriptionFilterDirectiveError(fieldPath: string, errorMessages: string[]): Error;
127
+ export declare function subscriptionFilterNamedTypeErrorMessage(namedTypeName: string): string;
126
128
  export declare function subscriptionFilterConditionDepthExceededErrorMessage(inputPath: string): string;
127
129
  export declare function subscriptionFilterConditionInvalidInputFieldNumberErrorMessage(inputPath: string, fieldNumber: number): string;
128
130
  export declare function subscriptionFilterConditionInvalidInputFieldErrorMessage(inputPath: string, invalidFieldName: string): string;
@@ -141,6 +143,6 @@ export declare function invalidSubscriptionFieldConditionFieldPathFieldErrorMess
141
143
  export declare function inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage(inputPath: string, fullConditionFieldPath: string, partialConditionFieldPath: string, fieldPath: string): string;
142
144
  export declare function nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage(inputPath: string, fullConditionFieldPath: string, fieldName: string, typeString: string, namedTypeName: string): string;
143
145
  export declare function unresolvablePathError({ fieldName, selectionSet }: UnresolvableFieldData, reasons: Array<string>): Error;
144
- export declare function allExternalFieldsError(typeName: string, subgraphNamesByFieldName: Map<string, Array<string>>): Error;
146
+ export declare function allExternalFieldInstancesError(typeName: string, subgraphNamesByFieldName: Map<string, Array<string>>): Error;
145
147
  export declare function externalInterfaceFieldsError(typeName: string, fieldNames: Array<string>): Error;
146
148
  export declare function nonExternalConditionalFieldError(originCoords: string, subgraphName: string, targetCoords: string, fieldSet: string, fieldSetDirective: FieldSetDirective): Error;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.invalidEventProviderIdErrorMessage = exports.invalidNatsStreamConfigurationDefinitionErrorMessage = exports.undefinedNatsStreamConfigurationInputErrorMessage = exports.invalidEdfsPublishResultObjectErrorMessage = exports.invalidNatsStreamInputErrorMessage = exports.inlineFragmentInFieldSetErrorMessage = exports.inaccessibleQueryRootTypeError = exports.noQueryRootTypeError = exports.federationFactoryInitializationFatalError = exports.subgraphValidationFailureError = exports.minimumSubgraphRequirementError = void 0;
4
+ exports.multipleNamedTypeDefinitionError = multipleNamedTypeDefinitionError;
4
5
  exports.incompatibleExtensionError = incompatibleExtensionError;
5
6
  exports.incompatibleArgumentTypesError = incompatibleArgumentTypesError;
6
7
  exports.incompatibleInputValueDefaultValueTypeError = incompatibleInputValueDefaultValueTypeError;
@@ -9,24 +10,24 @@ exports.incompatibleInputValueDefaultValuesError = incompatibleInputValueDefault
9
10
  exports.incompatibleSharedEnumError = incompatibleSharedEnumError;
10
11
  exports.incompatibleExtensionKindsError = incompatibleExtensionKindsError;
11
12
  exports.invalidSubgraphNamesError = invalidSubgraphNamesError;
12
- exports.duplicateFieldDefinitionError = duplicateFieldDefinitionError;
13
13
  exports.duplicateDirectiveDefinitionError = duplicateDirectiveDefinitionError;
14
14
  exports.duplicateEnumValueDefinitionError = duplicateEnumValueDefinitionError;
15
- exports.duplicateInterfaceExtensionError = duplicateInterfaceExtensionError;
16
- exports.duplicateInterfaceError = duplicateInterfaceError;
17
- exports.duplicateUnionMemberExtensionError = duplicateUnionMemberExtensionError;
18
- exports.duplicateValueExtensionError = duplicateValueExtensionError;
15
+ exports.duplicateFieldDefinitionError = duplicateFieldDefinitionError;
16
+ exports.duplicateInputFieldDefinitionError = duplicateInputFieldDefinitionError;
17
+ exports.duplicateImplementedInterfaceError = duplicateImplementedInterfaceError;
18
+ exports.duplicateUnionMemberDefinitionError = duplicateUnionMemberDefinitionError;
19
19
  exports.duplicateTypeDefinitionError = duplicateTypeDefinitionError;
20
20
  exports.duplicateOperationTypeDefinitionError = duplicateOperationTypeDefinitionError;
21
- exports.noBaseTypeExtensionError = noBaseTypeExtensionError;
21
+ exports.noBaseDefinitionForExtensionError = noBaseDefinitionForExtensionError;
22
+ exports.noBaseScalarDefinitionError = noBaseScalarDefinitionError;
22
23
  exports.noDefinedUnionMembersError = noDefinedUnionMembersError;
24
+ exports.noDefinedEnumValuesError = noDefinedEnumValuesError;
23
25
  exports.operationDefinitionError = operationDefinitionError;
24
26
  exports.invalidFieldShareabilityError = invalidFieldShareabilityError;
25
27
  exports.undefinedDirectiveErrorMessage = undefinedDirectiveErrorMessage;
26
28
  exports.undefinedTypeError = undefinedTypeError;
27
29
  exports.invalidRepeatedDirectiveErrorMessage = invalidRepeatedDirectiveErrorMessage;
28
30
  exports.invalidRepeatedFederatedDirectiveErrorMessage = invalidRepeatedFederatedDirectiveErrorMessage;
29
- exports.duplicateUnionMemberError = duplicateUnionMemberError;
30
31
  exports.invalidDirectiveError = invalidDirectiveError;
31
32
  exports.invalidDirectiveLocationErrorMessage = invalidDirectiveLocationErrorMessage;
32
33
  exports.unexpectedDirectiveArgumentsErrorMessage = unexpectedDirectiveArgumentsErrorMessage;
@@ -41,7 +42,6 @@ exports.unexpectedKindFatalError = unexpectedKindFatalError;
41
42
  exports.incompatibleParentKindFatalError = incompatibleParentKindFatalError;
42
43
  exports.unexpectedEdgeFatalError = unexpectedEdgeFatalError;
43
44
  exports.incompatibleParentKindMergeError = incompatibleParentKindMergeError;
44
- exports.incompatibleObjectExtensionOrphanBaseTypeError = incompatibleObjectExtensionOrphanBaseTypeError;
45
45
  exports.fieldTypeMergeFatalError = fieldTypeMergeFatalError;
46
46
  exports.unexpectedDirectiveLocationError = unexpectedDirectiveLocationError;
47
47
  exports.unexpectedTypeNodeKindFatalError = unexpectedTypeNodeKindFatalError;
@@ -82,6 +82,7 @@ exports.invalidSelectionOnUnionErrorMessage = invalidSelectionOnUnionErrorMessag
82
82
  exports.duplicateOverriddenFieldErrorMessage = duplicateOverriddenFieldErrorMessage;
83
83
  exports.duplicateOverriddenFieldsError = duplicateOverriddenFieldsError;
84
84
  exports.noFieldDefinitionsError = noFieldDefinitionsError;
85
+ exports.noInputValueDefinitionsError = noInputValueDefinitionsError;
85
86
  exports.allChildDefinitionsAreInaccessibleError = allChildDefinitionsAreInaccessibleError;
86
87
  exports.equivalentSourceAndTargetOverrideErrorMessage = equivalentSourceAndTargetOverrideErrorMessage;
87
88
  exports.undefinedEntityInterfaceImplementationsError = undefinedEntityInterfaceImplementationsError;
@@ -109,6 +110,7 @@ exports.invalidUnionMemberTypeError = invalidUnionMemberTypeError;
109
110
  exports.invalidRootTypeError = invalidRootTypeError;
110
111
  exports.invalidSubscriptionFilterLocationError = invalidSubscriptionFilterLocationError;
111
112
  exports.invalidSubscriptionFilterDirectiveError = invalidSubscriptionFilterDirectiveError;
113
+ exports.subscriptionFilterNamedTypeErrorMessage = subscriptionFilterNamedTypeErrorMessage;
112
114
  exports.subscriptionFilterConditionDepthExceededErrorMessage = subscriptionFilterConditionDepthExceededErrorMessage;
113
115
  exports.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage = subscriptionFilterConditionInvalidInputFieldNumberErrorMessage;
114
116
  exports.subscriptionFilterConditionInvalidInputFieldErrorMessage = subscriptionFilterConditionInvalidInputFieldErrorMessage;
@@ -127,7 +129,7 @@ exports.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage = invalidSub
127
129
  exports.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage = inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage;
128
130
  exports.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage = nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage;
129
131
  exports.unresolvablePathError = unresolvablePathError;
130
- exports.allExternalFieldsError = allExternalFieldsError;
132
+ exports.allExternalFieldInstancesError = allExternalFieldInstancesError;
131
133
  exports.externalInterfaceFieldsError = externalInterfaceFieldsError;
132
134
  exports.nonExternalConditionalFieldError = nonExternalConditionalFieldError;
133
135
  const utils_1 = require("../ast/utils");
@@ -136,6 +138,10 @@ const utils_2 = require("../utils/utils");
136
138
  const string_constants_1 = require("../utils/string-constants");
137
139
  const integer_constants_1 = require("../utils/integer-constants");
138
140
  exports.minimumSubgraphRequirementError = new Error('At least one subgraph is required for federation.');
141
+ function multipleNamedTypeDefinitionError(typeName, firstTypeString, secondTypeString) {
142
+ return new Error(`The named type "${typeName}" is defined as both types "${firstTypeString}" and "${secondTypeString}".` +
143
+ `\nHowever, there must be only one type named "${typeName}".`);
144
+ }
139
145
  function incompatibleExtensionError(typeName, baseKind, extensionKind) {
140
146
  return new Error(`Extension error:\n Incompatible types: ` +
141
147
  `"${typeName}" is type "${baseKind}", but an extension of the same name is type "${extensionKind}.`);
@@ -179,39 +185,42 @@ function invalidSubgraphNamesError(names, invalidNameErrorMessages) {
179
185
  }
180
186
  return new Error(message);
181
187
  }
182
- function duplicateFieldDefinitionError(fieldName, typeName) {
183
- return new Error(`Extension error:\n Field "${fieldName}" already exists on type "${typeName}".`);
184
- }
185
188
  function duplicateDirectiveDefinitionError(directiveName) {
186
- return new Error(`The directive "${directiveName}" has already been defined.`);
189
+ return new Error(`The directive "${directiveName}" must only be defined once.`);
187
190
  }
188
- function duplicateEnumValueDefinitionError(valueName, typeName) {
189
- return new Error(`Extension error:\n Value "${valueName}" already exists on enum "${typeName}".`);
191
+ function duplicateEnumValueDefinitionError(enumTypeName, valueName) {
192
+ return new Error(`The Enum "${enumTypeName}" must only define the Enum Value definition "${valueName}" once.`);
190
193
  }
191
- function duplicateInterfaceExtensionError(interfaceName, typeName) {
192
- return new Error(`Extension error:\n Interface "${interfaceName}" is already implemented by type "${typeName}".`);
194
+ function duplicateFieldDefinitionError(typeString, typeName, fieldName) {
195
+ return new Error(`The ${typeString} "${typeName}" must only define Field definition "${fieldName}" once.`);
193
196
  }
194
- function duplicateInterfaceError(interfaceName, typeName) {
195
- return new Error(`Interface "${interfaceName}" can only be defined on type "${typeName}" once.`);
197
+ function duplicateInputFieldDefinitionError(inputObjectTypeName, fieldName) {
198
+ return new Error(`The Input Object "${inputObjectTypeName}" must only define the Input Field definition "${fieldName}" once.`);
196
199
  }
197
- function duplicateUnionMemberExtensionError(memberName, typeName) {
198
- return new Error(`Extension error:\n Member "${memberName}" already exists on union "${typeName}".`);
200
+ function duplicateImplementedInterfaceError(typeString, typeName, interfaceName) {
201
+ return new Error(`The ${typeString} "${typeName}" must only implement the Interface "${interfaceName}" once.`);
199
202
  }
200
- function duplicateValueExtensionError(parentType, typeName, childName) {
201
- return new Error(`Extension error:\n` +
202
- ` More than one extension attempts to extend ${parentType} "${typeName}" with the value "${childName}".`);
203
+ function duplicateUnionMemberDefinitionError(unionTypeName, memberName) {
204
+ return new Error(`The Union "${unionTypeName}" must only define the Union Member "${memberName}" once.`);
203
205
  }
204
206
  function duplicateTypeDefinitionError(type, typeName) {
205
- return new Error(`The ${type} "${typeName}" can only be defined once.`);
207
+ return new Error(`The ${type} "${typeName}" must only be defined once.`);
206
208
  }
207
209
  function duplicateOperationTypeDefinitionError(operationTypeName, newTypeName, oldTypeName) {
208
210
  return new Error(`The operation type "${operationTypeName}" cannot be defined as "${newTypeName}" because it has already been defined as "${oldTypeName}".`);
209
211
  }
210
- function noBaseTypeExtensionError(typeName) {
211
- return new Error(`Extension error:\n Could not extend the type "${typeName}" because no base definition exists.`);
212
+ function noBaseDefinitionForExtensionError(typeString, typeName) {
213
+ return new Error(`The ${typeString} "${typeName}" is an extension,` +
214
+ ` but there is no base ${typeString} definition of "${typeName}" in any subgraph.`);
215
+ }
216
+ function noBaseScalarDefinitionError(typeName) {
217
+ return new Error(`The scalar extension "${typeName}" is invalid because no base definition is defined in the subgraph.`);
218
+ }
219
+ function noDefinedUnionMembersError(unionTypeName) {
220
+ return new Error(`The Union "${unionTypeName}" must define at least one Union Member.`);
212
221
  }
213
- function noDefinedUnionMembersError(unionTypeName, extension = false) {
214
- return new Error(`The union ` + (extension ? 'extension' : '') + ` "${unionTypeName}" must define at least one union member.`);
222
+ function noDefinedEnumValuesError(enumTypeName) {
223
+ return new Error(`The Enum "${enumTypeName}" must define at least one Enum Value.`);
215
224
  }
216
225
  function operationDefinitionError(typeName, operationType, actualType) {
217
226
  return new Error(`Expected the response type "${typeName}" for operation "${operationType}" to be type object but received "${actualType}.`);
@@ -260,9 +269,6 @@ function invalidRepeatedFederatedDirectiveErrorMessage(directiveName, hostPath)
260
269
  return new Error(`The definition for the directive "${directiveName}" does not define it as repeatable,` +
261
270
  ` but the directive has been declared on more than one instance of the type "${hostPath}".`);
262
271
  }
263
- function duplicateUnionMemberError(memberTypeName, unionTypeName) {
264
- return new Error(`Member "${memberTypeName}" must only be defined on union "${unionTypeName}" once.`);
265
- }
266
272
  function invalidDirectiveError(directiveName, hostPath, errorMessages) {
267
273
  return new Error(`The directive "${directiveName}" declared on "${hostPath}" is invalid for the following reason` +
268
274
  (errorMessages.length > 1 ? 's:\n' : ':\n') +
@@ -342,11 +348,7 @@ function unexpectedEdgeFatalError(typeName, edgeNames) {
342
348
  `:\n " ${edgeNames.join(string_constants_1.QUOTATION_JOIN)}".`);
343
349
  }
344
350
  function incompatibleParentKindMergeError(parentTypeName, expectedTypeString, actualTypeString) {
345
- return new Error(` When merging types, expected "${parentTypeName}" to be type ${expectedTypeString} but received "${actualTypeString}".`);
346
- }
347
- function incompatibleObjectExtensionOrphanBaseTypeError(parentTypeName, actualTypeString) {
348
- return new Error(` When merging the object extension orphan "${parentTypeName}", expected an existing object base type` +
349
- ` but received "${actualTypeString}".`);
351
+ return new Error(` When merging types, expected "${parentTypeName}" to be type "${expectedTypeString}" but received "${actualTypeString}".`);
350
352
  }
351
353
  function fieldTypeMergeFatalError(fieldName) {
352
354
  return new Error(`Fatal: Unsuccessfully merged the cross-subgraph types of field "${fieldName}"` +
@@ -406,11 +408,11 @@ function subgraphInvalidSyntaxError(error) {
406
408
  function invalidInterfaceImplementationError(parentTypeName, parentTypeString, implementationErrorsByInterfaceTypeName) {
407
409
  const messages = [];
408
410
  for (const [interfaceName, implementationErrors] of implementationErrorsByInterfaceTypeName) {
409
- let message = ` The implementation of interface "${interfaceName}" by "${parentTypeName}"` + ` is invalid because:\n`;
411
+ let message = ` The implementation of Interface "${interfaceName}" by "${parentTypeName}"` + ` is invalid because:\n`;
410
412
  const unimplementedFieldsLength = implementationErrors.unimplementedFields.length;
411
413
  if (unimplementedFieldsLength) {
412
414
  message +=
413
- ` The following field${unimplementedFieldsLength > 1 ? 's are' : ' is'} not implemented: "` +
415
+ ` The following Field${unimplementedFieldsLength > 1 ? 's are' : ' is'} not implemented: "` +
414
416
  implementationErrors.unimplementedFields.join('", "') +
415
417
  '"\n';
416
418
  }
@@ -418,10 +420,10 @@ function invalidInterfaceImplementationError(parentTypeName, parentTypeString, i
418
420
  const unimplementedArgumentsSize = invalidFieldImplementation.unimplementedArguments.size;
419
421
  const invalidArgumentsLength = invalidFieldImplementation.invalidImplementedArguments.length;
420
422
  const invalidAdditionalArgumentsSize = invalidFieldImplementation.invalidAdditionalArguments.size;
421
- message += ` The field "${fieldName}" is invalid because:\n`;
423
+ message += ` The Field "${fieldName}" is invalid because:\n`;
422
424
  if (unimplementedArgumentsSize) {
423
425
  message +=
424
- ` The following argument${unimplementedArgumentsSize > 1 ? 's are' : ' is'} not implemented: "` +
426
+ ` The following Argument${unimplementedArgumentsSize > 1 ? 's are' : ' is'} not implemented: "` +
425
427
  [...invalidFieldImplementation.unimplementedArguments].join('", "') +
426
428
  '"\n';
427
429
  }
@@ -429,17 +431,17 @@ function invalidInterfaceImplementationError(parentTypeName, parentTypeString, i
429
431
  message += ` The following implemented argument${invalidArgumentsLength > 1 ? 's are' : ' is'} invalid:\n`;
430
432
  for (const invalidArgument of invalidFieldImplementation.invalidImplementedArguments) {
431
433
  message +=
432
- ` The argument "${invalidArgument.argumentName}" must define type "` +
434
+ ` The Argument "${invalidArgument.argumentName}" must define type "` +
433
435
  invalidArgument.expectedType +
434
436
  `" and not "${invalidArgument.actualType}"\n`;
435
437
  }
436
438
  }
437
439
  if (invalidAdditionalArgumentsSize) {
438
440
  message +=
439
- ` If a field from an interface is implemented, any additional arguments that were not defined` +
440
- ` on the original interface field must be optional (nullable).\n`;
441
+ ` If a Field from an Interface is implemented, any additional Arguments that were not defined` +
442
+ ` on the original Interface Field must be optional (nullable).\n`;
441
443
  message +=
442
- ` The following additional argument` +
444
+ ` The following additional Argument` +
443
445
  (invalidFieldImplementation.invalidAdditionalArguments.size > 1 ? `s are` : ` is`) +
444
446
  ` not defined as optional: "` +
445
447
  [...invalidFieldImplementation.invalidAdditionalArguments].join(`", "`) +
@@ -454,13 +456,13 @@ function invalidInterfaceImplementationError(parentTypeName, parentTypeString, i
454
456
  }
455
457
  if (invalidFieldImplementation.isInaccessible) {
456
458
  message +=
457
- ` The field has been declared @inaccessible; however, the same field has not been declared @inaccessible` +
458
- ` on the interface definition.\n Consequently, the interface implementation cannot be satisfied.\n`;
459
+ ` The field has been declared "@inaccessible"; however, the same field has not been declared "@inaccessible"` +
460
+ ` on the Interface definition.\n Consequently, the Interface implementation cannot be satisfied.\n`;
459
461
  }
460
462
  }
461
463
  messages.push(message);
462
464
  }
463
- return new Error(`The ${parentTypeString} "${parentTypeName}" has the following interface implementation errors:\n` +
465
+ return new Error(`The ${parentTypeString} "${parentTypeName}" has the following Interface implementation errors:\n` +
464
466
  messages.join('\n'));
465
467
  }
466
468
  function invalidRequiredInputValueError(typeString, path, errors, isArgument = true) {
@@ -635,7 +637,7 @@ function invalidInlineFragmentTypeConditionErrorMessage(fieldSet, fieldCoordinat
635
637
  ` This is because an inline fragment with the type condition "${typeConditionName}" is defined on the` +
636
638
  ` selection set corresponding to the ` +
637
639
  getSelectionSetLocationWithTypeString(fieldCoordinatesPath, selectionSetTypeName, parentTypeString);
638
- if (parentTypeString === 'interface') {
640
+ if (parentTypeString === string_constants_1.INTERFACE) {
639
641
  return message + ` However, "${typeConditionName}" does not implement "${selectionSetTypeName}"`;
640
642
  }
641
643
  return message + ` However, "${typeConditionName}" is not a member of "${selectionSetTypeName}".`;
@@ -663,6 +665,9 @@ function duplicateOverriddenFieldsError(errorMessages) {
663
665
  function noFieldDefinitionsError(typeString, typeName) {
664
666
  return new Error(`The ${typeString} "${typeName}" is invalid because it does not define any fields.`);
665
667
  }
668
+ function noInputValueDefinitionsError(inputTypeName) {
669
+ return new Error(`The Input Object "${inputTypeName}" is invalid because it does not define any input values.`);
670
+ }
666
671
  function allChildDefinitionsAreInaccessibleError(typeString, typeName, childType) {
667
672
  return new Error(`The ${typeString} "${typeName}" is invalid because all its ${childType} definitions are declared "@inaccessible".`);
668
673
  }
@@ -824,8 +829,9 @@ function nonKeyFieldNamesEventDrivenErrorMessage(nonKeyFieldNameByFieldPath) {
824
829
  return message;
825
830
  }
826
831
  function nonEntityObjectExtensionsEventDrivenErrorMessage(typeNames) {
827
- return (` Only root types and entities (objects that define one or more primary keys with the "@key" directive) may` +
828
- ` be defined as object extensions in an Event Driven graph. Consequently, the following object extension` +
832
+ return (`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may` +
833
+ ` be defined as object extensions in an Event Driven graph.` +
834
+ `\nConsequently, the following object extension` +
829
835
  ` definition` +
830
836
  (typeNames.length > 1 ? 's are' : ' is') +
831
837
  ` invalid:\n "` +
@@ -912,6 +918,9 @@ function invalidSubscriptionFilterDirectiveError(fieldPath, errorMessages) {
912
918
  `:\n` +
913
919
  errorMessages.join(`\n`));
914
920
  }
921
+ function subscriptionFilterNamedTypeErrorMessage(namedTypeName) {
922
+ return ` Unknown type "${namedTypeName}".`;
923
+ }
915
924
  function subscriptionFilterConditionDepthExceededErrorMessage(inputPath) {
916
925
  return (` The input path "${inputPath}" exceeds the maximum depth of ${integer_constants_1.MAX_SUBSCRIPTION_FILTER_DEPTH}` +
917
926
  ` for any one filter condition.\n` +
@@ -1035,10 +1044,10 @@ function unresolvablePathError({ fieldName, selectionSet }, reasons) {
1035
1044
  reasons.join(`\n - `);
1036
1045
  return new Error(message);
1037
1046
  }
1038
- function allExternalFieldsError(typeName, subgraphNamesByFieldName) {
1039
- let message = `The object "${typeName}" is invalid because the following field definition` +
1047
+ function allExternalFieldInstancesError(typeName, subgraphNamesByFieldName) {
1048
+ let message = `The Object "${typeName}" is invalid because the following Field definition` +
1040
1049
  (subgraphNamesByFieldName.size > 1 ? 's are' : ' is') +
1041
- ` declared @external on all instances of that field:\n`;
1050
+ ` declared "@external" on all instances of that Field:\n`;
1042
1051
  for (const [fieldName, subgraphNames] of subgraphNamesByFieldName) {
1043
1052
  message +=
1044
1053
  ` "${fieldName}" in subgraph` +
@@ -1047,7 +1056,7 @@ function allExternalFieldsError(typeName, subgraphNamesByFieldName) {
1047
1056
  subgraphNames.join(string_constants_1.QUOTATION_JOIN) +
1048
1057
  `"\n`;
1049
1058
  }
1050
- message += `At least one instance of a field definition must always be resolvable (and therefore not declared @external).`;
1059
+ message += `At least one instance of a Field definition must always be resolvable (and therefore not declared "@external").`;
1051
1060
  return new Error(message);
1052
1061
  }
1053
1062
  function externalInterfaceFieldsError(typeName, fieldNames) {