@wundergraph/composition 0.35.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/ast/utils.js.map +1 -1
  2. package/dist/errors/errors.d.ts +16 -16
  3. package/dist/errors/errors.js +81 -82
  4. package/dist/errors/errors.js.map +1 -1
  5. package/dist/federation/federation-factory.d.ts +11 -3
  6. package/dist/federation/federation-factory.js +137 -10
  7. package/dist/federation/federation-factory.js.map +1 -1
  8. package/dist/federation/utils.d.ts +2 -1
  9. package/dist/federation/utils.js +11 -0
  10. package/dist/federation/utils.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +1 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/normalization/directive-definition-data.d.ts +25 -0
  15. package/dist/normalization/directive-definition-data.js +559 -0
  16. package/dist/normalization/directive-definition-data.js.map +1 -0
  17. package/dist/normalization/normalization-factory.d.ts +36 -11
  18. package/dist/normalization/normalization-factory.js +678 -124
  19. package/dist/normalization/normalization-factory.js.map +1 -1
  20. package/dist/normalization/utils.d.ts +27 -4
  21. package/dist/normalization/utils.js +31 -114
  22. package/dist/normalization/utils.js.map +1 -1
  23. package/dist/normalization/walkers.js +71 -68
  24. package/dist/normalization/walkers.js.map +1 -1
  25. package/dist/schema-building/ast.d.ts +1 -0
  26. package/dist/schema-building/ast.js +9 -0
  27. package/dist/schema-building/ast.js.map +1 -1
  28. package/dist/schema-building/type-definition-data.d.ts +36 -2
  29. package/dist/schema-building/type-definition-data.js.map +1 -1
  30. package/dist/schema-building/utils.d.ts +10 -20
  31. package/dist/schema-building/utils.js +54 -333
  32. package/dist/schema-building/utils.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/utils/composition-version.js +1 -1
  35. package/dist/utils/constants.d.ts +25 -3
  36. package/dist/utils/constants.js +200 -134
  37. package/dist/utils/constants.js.map +1 -1
  38. package/dist/utils/string-constants.d.ts +14 -0
  39. package/dist/utils/string-constants.js +30 -3
  40. package/dist/utils/string-constants.js.map +1 -1
  41. package/dist/utils/utils.d.ts +2 -1
  42. package/dist/utils/utils.js +7 -2
  43. package/dist/utils/utils.js.map +1 -1
  44. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":";;;AAyDA,wDAUC;AAED,sDAUC;AAED,0CAUC;AAED,gFAiBC;AAED,4CAKC;AAED,gEAMC;AAED,gDAMC;AAED,sDAKC;AAED,0DAMC;AAED,kEA+CC;AAQD,wCAEC;AAED,kFAWC;AAED,8CAYC;AAED,gFAMC;AAED,sFAyCC;AAED,8EAaC;AAOD,sBAEC;AAED,8BAOC;AA9TD,qCA6BiB;AACjB,gEAuBmC;AAInC,SAAgB,sBAAsB,CAAC,IAAyB;IAC9D,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,sBAAG,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,qBAAqB,CAAC,IAA8B;IAClE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,mCAAgB,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,eAAe,CAAC,IAA4D;IAC1F,IAAI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AAOD,SAAgB,KAAK,CAAC,MAAc,EAAE,UAAU,GAAG,IAAI;IACrD,OAAO,IAAA,eAAY,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,SAAS,CAAC,KAAa,EAAE,UAAU,GAAG,IAAI;IACxD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC7C,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"}
@@ -1,4 +1,4 @@
1
- import { ConstDirectiveNode, Kind, OperationTypeNode, SchemaExtensionNode, TypeDefinitionNode, TypeExtensionNode } from 'graphql';
1
+ import { Kind, OperationTypeNode } from 'graphql';
2
2
  import { EntityInterfaceFederationData, ImplementationErrors, InvalidArgument, InvalidEntityInterface, InvalidRequiredInputValueData } from '../utils/utils';
3
3
  import { ObjectDefinitionData } from '../schema-building/type-definition-data';
4
4
  import { InvalidRootTypeFieldEventsDirectiveData } from './utils';
@@ -6,13 +6,11 @@ import { UnresolvableFieldData } from '../resolvability-graph/utils';
6
6
  import { FieldSetDirective } from '../schema-building/utils';
7
7
  export declare const minimumSubgraphRequirementError: Error;
8
8
  export declare function multipleNamedTypeDefinitionError(typeName: string, firstTypeString: string, secondTypeString: string): Error;
9
- export declare function incompatibleExtensionError(typeName: string, baseKind: Kind, extensionKind: Kind): Error;
10
9
  export declare function incompatibleArgumentTypesError(argName: string, hostPath: string, expectedType: string, actualType: string): Error;
11
10
  export declare function incompatibleInputValueDefaultValueTypeError(prefix: string, path: string, typeString: string, defaultValue: string): Error;
12
11
  export declare function incompatibleChildTypesError(childPath: string, expectedType: string, actualType: string): Error;
13
12
  export declare function incompatibleInputValueDefaultValuesError(prefix: string, path: string, subgraphNames: string[], expectedDefaultValue: string, actualDefaultValue: string): Error;
14
13
  export declare function incompatibleSharedEnumError(parentName: string): Error;
15
- export declare function incompatibleExtensionKindsError(node: TypeDefinitionNode | TypeExtensionNode | SchemaExtensionNode, existingKind: Kind): Error;
16
14
  export declare function invalidSubgraphNamesError(names: string[], invalidNameErrorMessages: string[]): Error;
17
15
  export declare function duplicateDirectiveDefinitionError(directiveName: string): Error;
18
16
  export declare function duplicateEnumValueDefinitionError(enumTypeName: string, valueName: string): Error;
@@ -28,18 +26,17 @@ export declare function noDefinedUnionMembersError(unionTypeName: string): Error
28
26
  export declare function noDefinedEnumValuesError(enumTypeName: string): Error;
29
27
  export declare function operationDefinitionError(typeName: string, operationType: OperationTypeNode, actualType: Kind): Error;
30
28
  export declare function invalidFieldShareabilityError(objectData: ObjectDefinitionData, invalidFieldNames: Set<string>): Error;
31
- export declare function undefinedDirectiveErrorMessage(directiveName: string, hostPath: string): string;
29
+ export declare function undefinedDirectiveError(directiveName: string, directiveCoords: string): Error;
32
30
  export declare function undefinedTypeError(typeName: string): Error;
33
- export declare function invalidRepeatedDirectiveErrorMessage(directiveName: string, hostPath: string): string;
34
- export declare function invalidRepeatedFederatedDirectiveErrorMessage(directiveName: string, hostPath: string): Error;
35
- export declare function invalidDirectiveError(directiveName: string, hostPath: string, errorMessages: string[]): Error;
36
- export declare function invalidDirectiveLocationErrorMessage(hostPath: string, kind: Kind, directiveName: string): string;
37
- export declare function unexpectedDirectiveArgumentsErrorMessage(directive: ConstDirectiveNode, hostPath: string): string;
38
- export declare function undefinedRequiredArgumentsErrorMessage(directiveName: string, hostPath: string, requiredArguments: string[], missingRequiredArguments?: string[]): string;
31
+ export declare function invalidRepeatedDirectiveErrorMessage(directiveName: string): string;
32
+ export declare function invalidDirectiveError(directiveName: string, directiveCoords: string, ordinal: string, errorMessages: Array<string>): Error;
33
+ export declare function invalidRepeatedFederatedDirectiveErrorMessage(directiveName: string, directiveCoords: string): Error;
34
+ export declare function invalidDirectiveLocationErrorMessage(directiveName: string, location: string): string;
35
+ export declare function undefinedRequiredArgumentsErrorMessage(directiveName: string, requiredArgumentNames: string[], undefinedArgumentNames: string[]): string;
39
36
  export declare function unexpectedDirectiveArgumentErrorMessage(directiveName: string, argumentNames: string[]): string;
40
- export declare function duplicateDirectiveArgumentDefinitionsErrorMessage(directiveName: string, hostPath: string, argumentNames: string[]): string;
37
+ export declare function duplicateDirectiveArgumentDefinitionsErrorMessage(argumentNames: string[]): string;
38
+ export declare function invalidArgumentValueErrorMessage(value: string, hostName: string, argumentName: string, expectedTypeString: string): string;
41
39
  export declare function invalidDirectiveArgumentTypeErrorMessage(required: boolean, argumentName: string, expectedKind: Kind, actualKind: Kind): string;
42
- export declare function invalidKeyDirectiveArgumentErrorMessage(directiveKind: Kind): string;
43
40
  export declare function invalidKeyDirectivesError(parentTypeName: string, errorMessages: string[]): Error;
44
41
  export declare function maximumTypeNestingExceededError(path: string): Error;
45
42
  export declare function unexpectedKindFatalError(typeName: string): Error;
@@ -53,7 +50,6 @@ export declare function invalidKeyFatalError<K>(key: K, mapName: string): Error;
53
50
  export declare function invalidConfigurationResultFatalError(fieldPath: string): Error;
54
51
  export declare const subgraphValidationFailureError: Error;
55
52
  export declare const federationFactoryInitializationFatalError: Error;
56
- export declare function unexpectedParentKindErrorMessage(parentTypeName: string, expectedTypeString: string, actualTypeString: string): string;
57
53
  export declare function unexpectedParentKindForChildError(parentTypeName: string, expectedTypeString: string, actualTypeString: string, childName: string, childTypeString: string): Error;
58
54
  export declare function subgraphValidationError(subgraphName: string, errors: Error[]): Error;
59
55
  export declare function invalidSubgraphNameErrorMessage(index: number, newName: string): string;
@@ -95,13 +91,12 @@ export declare function noInputValueDefinitionsError(inputTypeName: string): Err
95
91
  export declare function allChildDefinitionsAreInaccessibleError(typeString: string, typeName: string, childType: string): Error;
96
92
  export declare function equivalentSourceAndTargetOverrideErrorMessage(subgraphName: string, hostPath: string): string;
97
93
  export declare function undefinedEntityInterfaceImplementationsError(invalidEntityInterfacesByTypeName: Map<string, InvalidEntityInterface[]>, entityInterfaceFederationDataByTypeName: Map<string, EntityInterfaceFederationData>): Error;
98
- export declare function orScopesLimitError(maxOrScopes: number, hostPaths: string[]): Error;
94
+ export declare function orScopesLimitError(maxOrScopes: number, directiveCoords: string[]): Error;
99
95
  export declare function invalidEventDrivenGraphError(errorMessages: string[]): Error;
100
96
  export declare function invalidRootTypeFieldEventsDirectivesErrorMessage(invalidEventsDirectiveDataByRootFieldPath: Map<string, InvalidRootTypeFieldEventsDirectiveData>): string;
101
97
  export declare function invalidEventDrivenMutationResponseTypeErrorMessage(invalidResponseTypeStringByMutationPath: Map<string, string>): string;
102
98
  export declare function invalidRootTypeFieldResponseTypesEventDrivenErrorMessage(invalidResponseTypeStringByRootFieldPath: Map<string, string>): string;
103
99
  export declare const invalidNatsStreamInputErrorMessage: string;
104
- export declare function invalidArgumentValueErrorMessage(hostCoords: string, kind: Kind, value?: string): string;
105
100
  export declare function invalidNatsStreamInputFieldsErrorMessage(missingRequiredFieldNames: string[], duplicateRequiredFieldNames: string[], invalidRequiredFieldNames: string[], invalidFieldNames: string[]): string;
106
101
  export declare function invalidKeyFieldSetsEventDrivenErrorMessage(invalidKeyFieldSetsByEntityTypeName?: Map<string, string[]>): string;
107
102
  export declare function nonExternalKeyFieldNamesEventDrivenErrorMessage(nonExternalKeyFieldNameByFieldPath: Map<string, string>): string;
@@ -109,7 +104,6 @@ export declare function nonKeyFieldNamesEventDrivenErrorMessage(nonKeyFieldNameB
109
104
  export declare function nonEntityObjectExtensionsEventDrivenErrorMessage(typeNames: string[]): string;
110
105
  export declare function nonKeyComposingObjectTypeNamesEventDrivenErrorMessage(typeNames: string[]): string;
111
106
  export declare const invalidEdfsPublishResultObjectErrorMessage: string;
112
- export declare const undefinedNatsStreamConfigurationInputErrorMessage: string;
113
107
  export declare const invalidNatsStreamConfigurationDefinitionErrorMessage: string;
114
108
  export declare function invalidEdfsDirectiveName(directiveName: string): Error;
115
109
  export declare function invalidImplementedTypeError(typeName: string, invalidImplementationTypeStringByTypeName: Map<string, string>): Error;
@@ -155,3 +149,9 @@ export declare function unknownNamedTypeError(fieldCoordinates: string, namedTyp
155
149
  export declare function unknownFieldDataError(fieldCoordinates: string): Error;
156
150
  export declare function unexpectedNonCompositeOutputTypeError(namedTypeName: string, actualTypeString: string): Error;
157
151
  export declare function invalidExternalDirectiveError(fieldCoords: string): Error;
152
+ export declare function configureDescriptionNoDescriptionError(typeString: string, typeName: string): Error;
153
+ export declare function configureDescriptionPropagationError(coords: string, subgraphNames: Array<string>): Error;
154
+ export declare function duplicateDirectiveDefinitionArgumentErrorMessage(argumentNames: Array<string>): string;
155
+ export declare function duplicateDirectiveDefinitionLocationErrorMessage(locationName: string): string;
156
+ export declare function invalidDirectiveDefinitionLocationErrorMessage(locationName: string): string;
157
+ export declare function invalidDirectiveDefinitionError(directiveName: string, errorMessages: Array<string>): Error;
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.invalidEventProviderIdErrorMessage = exports.invalidNatsStreamConfigurationDefinitionErrorMessage = exports.invalidEdfsPublishResultObjectErrorMessage = exports.invalidNatsStreamInputErrorMessage = exports.inlineFragmentInFieldSetErrorMessage = exports.inaccessibleQueryRootTypeError = exports.noQueryRootTypeError = exports.federationFactoryInitializationFatalError = exports.subgraphValidationFailureError = exports.minimumSubgraphRequirementError = void 0;
4
4
  exports.multipleNamedTypeDefinitionError = multipleNamedTypeDefinitionError;
5
- exports.incompatibleExtensionError = incompatibleExtensionError;
6
5
  exports.incompatibleArgumentTypesError = incompatibleArgumentTypesError;
7
6
  exports.incompatibleInputValueDefaultValueTypeError = incompatibleInputValueDefaultValueTypeError;
8
7
  exports.incompatibleChildTypesError = incompatibleChildTypesError;
9
8
  exports.incompatibleInputValueDefaultValuesError = incompatibleInputValueDefaultValuesError;
10
9
  exports.incompatibleSharedEnumError = incompatibleSharedEnumError;
11
- exports.incompatibleExtensionKindsError = incompatibleExtensionKindsError;
12
10
  exports.invalidSubgraphNamesError = invalidSubgraphNamesError;
13
11
  exports.duplicateDirectiveDefinitionError = duplicateDirectiveDefinitionError;
14
12
  exports.duplicateEnumValueDefinitionError = duplicateEnumValueDefinitionError;
@@ -24,18 +22,17 @@ exports.noDefinedUnionMembersError = noDefinedUnionMembersError;
24
22
  exports.noDefinedEnumValuesError = noDefinedEnumValuesError;
25
23
  exports.operationDefinitionError = operationDefinitionError;
26
24
  exports.invalidFieldShareabilityError = invalidFieldShareabilityError;
27
- exports.undefinedDirectiveErrorMessage = undefinedDirectiveErrorMessage;
25
+ exports.undefinedDirectiveError = undefinedDirectiveError;
28
26
  exports.undefinedTypeError = undefinedTypeError;
29
27
  exports.invalidRepeatedDirectiveErrorMessage = invalidRepeatedDirectiveErrorMessage;
30
- exports.invalidRepeatedFederatedDirectiveErrorMessage = invalidRepeatedFederatedDirectiveErrorMessage;
31
28
  exports.invalidDirectiveError = invalidDirectiveError;
29
+ exports.invalidRepeatedFederatedDirectiveErrorMessage = invalidRepeatedFederatedDirectiveErrorMessage;
32
30
  exports.invalidDirectiveLocationErrorMessage = invalidDirectiveLocationErrorMessage;
33
- exports.unexpectedDirectiveArgumentsErrorMessage = unexpectedDirectiveArgumentsErrorMessage;
34
31
  exports.undefinedRequiredArgumentsErrorMessage = undefinedRequiredArgumentsErrorMessage;
35
32
  exports.unexpectedDirectiveArgumentErrorMessage = unexpectedDirectiveArgumentErrorMessage;
36
33
  exports.duplicateDirectiveArgumentDefinitionsErrorMessage = duplicateDirectiveArgumentDefinitionsErrorMessage;
34
+ exports.invalidArgumentValueErrorMessage = invalidArgumentValueErrorMessage;
37
35
  exports.invalidDirectiveArgumentTypeErrorMessage = invalidDirectiveArgumentTypeErrorMessage;
38
- exports.invalidKeyDirectiveArgumentErrorMessage = invalidKeyDirectiveArgumentErrorMessage;
39
36
  exports.invalidKeyDirectivesError = invalidKeyDirectivesError;
40
37
  exports.maximumTypeNestingExceededError = maximumTypeNestingExceededError;
41
38
  exports.unexpectedKindFatalError = unexpectedKindFatalError;
@@ -47,7 +44,6 @@ exports.unexpectedDirectiveLocationError = unexpectedDirectiveLocationError;
47
44
  exports.unexpectedTypeNodeKindFatalError = unexpectedTypeNodeKindFatalError;
48
45
  exports.invalidKeyFatalError = invalidKeyFatalError;
49
46
  exports.invalidConfigurationResultFatalError = invalidConfigurationResultFatalError;
50
- exports.unexpectedParentKindErrorMessage = unexpectedParentKindErrorMessage;
51
47
  exports.unexpectedParentKindForChildError = unexpectedParentKindForChildError;
52
48
  exports.subgraphValidationError = subgraphValidationError;
53
49
  exports.invalidSubgraphNameErrorMessage = invalidSubgraphNameErrorMessage;
@@ -91,7 +87,6 @@ exports.invalidEventDrivenGraphError = invalidEventDrivenGraphError;
91
87
  exports.invalidRootTypeFieldEventsDirectivesErrorMessage = invalidRootTypeFieldEventsDirectivesErrorMessage;
92
88
  exports.invalidEventDrivenMutationResponseTypeErrorMessage = invalidEventDrivenMutationResponseTypeErrorMessage;
93
89
  exports.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage = invalidRootTypeFieldResponseTypesEventDrivenErrorMessage;
94
- exports.invalidArgumentValueErrorMessage = invalidArgumentValueErrorMessage;
95
90
  exports.invalidNatsStreamInputFieldsErrorMessage = invalidNatsStreamInputFieldsErrorMessage;
96
91
  exports.invalidKeyFieldSetsEventDrivenErrorMessage = invalidKeyFieldSetsEventDrivenErrorMessage;
97
92
  exports.nonExternalKeyFieldNamesEventDrivenErrorMessage = nonExternalKeyFieldNamesEventDrivenErrorMessage;
@@ -141,9 +136,13 @@ exports.unknownNamedTypeError = unknownNamedTypeError;
141
136
  exports.unknownFieldDataError = unknownFieldDataError;
142
137
  exports.unexpectedNonCompositeOutputTypeError = unexpectedNonCompositeOutputTypeError;
143
138
  exports.invalidExternalDirectiveError = invalidExternalDirectiveError;
144
- const utils_1 = require("../ast/utils");
145
- const graphql_1 = require("graphql");
146
- const utils_2 = require("../utils/utils");
139
+ exports.configureDescriptionNoDescriptionError = configureDescriptionNoDescriptionError;
140
+ exports.configureDescriptionPropagationError = configureDescriptionPropagationError;
141
+ exports.duplicateDirectiveDefinitionArgumentErrorMessage = duplicateDirectiveDefinitionArgumentErrorMessage;
142
+ exports.duplicateDirectiveDefinitionLocationErrorMessage = duplicateDirectiveDefinitionLocationErrorMessage;
143
+ exports.invalidDirectiveDefinitionLocationErrorMessage = invalidDirectiveDefinitionLocationErrorMessage;
144
+ exports.invalidDirectiveDefinitionError = invalidDirectiveDefinitionError;
145
+ const utils_1 = require("../utils/utils");
147
146
  const string_constants_1 = require("../utils/string-constants");
148
147
  const integer_constants_1 = require("../utils/integer-constants");
149
148
  exports.minimumSubgraphRequirementError = new Error('At least one subgraph is required for federation.');
@@ -151,10 +150,6 @@ function multipleNamedTypeDefinitionError(typeName, firstTypeString, secondTypeS
151
150
  return new Error(`The named type "${typeName}" is defined as both types "${firstTypeString}" and "${secondTypeString}".` +
152
151
  `\nHowever, there must be only one type named "${typeName}".`);
153
152
  }
154
- function incompatibleExtensionError(typeName, baseKind, extensionKind) {
155
- return new Error(`Extension error:\n Incompatible types: ` +
156
- `"${typeName}" is type "${baseKind}", but an extension of the same name is type "${extensionKind}.`);
157
- }
158
153
  function incompatibleArgumentTypesError(argName, hostPath, expectedType, actualType) {
159
154
  return new Error(`Incompatible types when merging two instances of argument "${argName}" on path "${hostPath}":\n` +
160
155
  ` Expected type "${expectedType}" but received "${actualType}"`);
@@ -179,11 +174,6 @@ function incompatibleInputValueDefaultValuesError(prefix, path, subgraphNames, e
179
174
  function incompatibleSharedEnumError(parentName) {
180
175
  return new Error(`Enum "${parentName}" was used as both an input and output but was inconsistently defined across inclusive subgraphs.`);
181
176
  }
182
- // The @extends directive means a TypeDefinitionNode is possible
183
- function incompatibleExtensionKindsError(node, existingKind) {
184
- const name = node.kind === graphql_1.Kind.SCHEMA_EXTENSION ? 'schema' : node.name.value;
185
- return new Error(`Expected extension "${name}" to be type ${existingKind} but received ${node.kind}.`);
186
- }
187
177
  function invalidSubgraphNamesError(names, invalidNameErrorMessages) {
188
178
  let message = 'Subgraphs to be federated must each have a unique, non-empty name.';
189
179
  if (names.length > 0) {
@@ -265,77 +255,67 @@ function invalidFieldShareabilityError(objectData, invalidFieldNames) {
265
255
  return new Error(`The object "${parentTypeName}" defines the same fields in multiple subgraphs without the "@shareable" directive:` +
266
256
  `${errorMessages.join('\n')}`);
267
257
  }
268
- function undefinedDirectiveErrorMessage(directiveName, hostPath) {
269
- return (`The directive "${directiveName}" is declared on "${hostPath}",` +
270
- ` but the directive is not defined in the schema.`);
258
+ function undefinedDirectiveError(directiveName, directiveCoords) {
259
+ return new Error(`The directive "@${directiveName}" declared on coordinates "${directiveCoords}" is not defined in the schema.`);
271
260
  }
272
261
  function undefinedTypeError(typeName) {
273
262
  return new Error(` The type "${typeName}" was referenced in the schema, but it was never defined.`);
274
263
  }
275
- function invalidRepeatedDirectiveErrorMessage(directiveName, hostPath) {
276
- return (`The definition for the directive "${directiveName}" does not define it as repeatable, ` +
277
- `but the same directive is declared more than once on type "${hostPath}".`);
264
+ function invalidRepeatedDirectiveErrorMessage(directiveName) {
265
+ return `The definition for the directive "@${directiveName}" does not define it as repeatable, but it is declared more than once on these coordinates.`;
278
266
  }
279
- function invalidRepeatedFederatedDirectiveErrorMessage(directiveName, hostPath) {
280
- return new Error(`The definition for the directive "${directiveName}" does not define it as repeatable,` +
281
- ` but the directive has been declared on more than one instance of the type "${hostPath}".`);
282
- }
283
- function invalidDirectiveError(directiveName, hostPath, errorMessages) {
284
- return new Error(`The directive "${directiveName}" declared on "${hostPath}" is invalid for the following reason` +
267
+ function invalidDirectiveError(directiveName, directiveCoords, ordinal, errorMessages) {
268
+ return new Error(`The ${ordinal} instance of the directive "@${directiveName}" declared on coordinates "${directiveCoords}" is invalid for the following reason` +
285
269
  (errorMessages.length > 1 ? 's:\n' : ':\n') +
286
270
  errorMessages.join('\n'));
287
271
  }
288
- function invalidDirectiveLocationErrorMessage(hostPath, kind, directiveName) {
289
- return (` "${hostPath}" is type "${kind}", but the directive "${directiveName}" ` +
290
- `does not define "${(0, utils_1.nodeKindToDirectiveLocation)(kind)}" as a valid location.`);
272
+ function invalidRepeatedFederatedDirectiveErrorMessage(directiveName, directiveCoords) {
273
+ return new Error(`The definition for the directive "@${directiveName}" does not define it as repeatable,` +
274
+ ` but the directive has been declared on more than one instance of the type "${directiveCoords}".`);
291
275
  }
292
- function unexpectedDirectiveArgumentsErrorMessage(directive, hostPath) {
293
- const directiveName = directive.name.value;
294
- const argumentNumber = directive.arguments?.length || 1; // should never be less than 1
295
- return (` The definition for the directive "${directiveName}" does not define any arguments.\n` +
296
- ` However, the same directive declared on "${hostPath}" defines ${argumentNumber} argument` +
297
- (argumentNumber > 1 ? 's.' : '.'));
276
+ function invalidDirectiveLocationErrorMessage(directiveName, location) {
277
+ return ` The definition for "@${directiveName}" does not define "${location}" as a valid location.`;
298
278
  }
299
- function undefinedRequiredArgumentsErrorMessage(directiveName, hostPath, requiredArguments, missingRequiredArguments = []) {
300
- let message = ` The definition for the directive "${directiveName}" defines the following ` +
301
- requiredArguments.length +
279
+ function undefinedRequiredArgumentsErrorMessage(directiveName, requiredArgumentNames, undefinedArgumentNames) {
280
+ let message = ` The definition for "@${directiveName}" defines the following ` +
281
+ requiredArgumentNames.length +
302
282
  ` required argument` +
303
- (requiredArguments.length > 1 ? 's: ' : ': ') +
283
+ (requiredArgumentNames.length > 1 ? 's: ' : ': ') +
304
284
  `"` +
305
- requiredArguments.join('", "') +
285
+ requiredArgumentNames.join('", "') +
306
286
  `"` +
307
- `.\n However, the same directive that is declared on "${hostPath}" does not define`;
308
- if (missingRequiredArguments.length < 1) {
309
- return message + ` any arguments.`;
287
+ `.\n However,`;
288
+ if (undefinedArgumentNames.length < 1) {
289
+ return message + ` no arguments are defined on this instance.`;
310
290
  }
311
291
  return (message +
312
292
  ` the following required argument` +
313
- (missingRequiredArguments.length > 1 ? `s` : ``) +
314
- `: "` +
315
- missingRequiredArguments.join(string_constants_1.QUOTATION_JOIN) +
293
+ (undefinedArgumentNames.length > 1 ? `s are` : ` is`) +
294
+ ` not defined on this instance: "` +
295
+ undefinedArgumentNames.join(string_constants_1.QUOTATION_JOIN) +
316
296
  `".`);
317
297
  }
318
298
  function unexpectedDirectiveArgumentErrorMessage(directiveName, argumentNames) {
319
- return (` The definition for the directive "${directiveName}" does not define the following provided argument` +
320
- (argumentNames.length > 1 ? 's' : '') +
321
- `: "` +
299
+ return (` The definition for "@${directiveName}" does not define the following argument` +
300
+ (argumentNames.length > 1 ? 's that are' : ' that is') +
301
+ ` provided: "` +
322
302
  argumentNames.join(string_constants_1.QUOTATION_JOIN) +
323
303
  `".`);
324
304
  }
325
- function duplicateDirectiveArgumentDefinitionsErrorMessage(directiveName, hostPath, argumentNames) {
326
- return (` The directive "${directiveName}" that is declared on "${hostPath}" defines the following argument` +
327
- (argumentNames.length > 1 ? 's' : '') +
328
- ` more than once: "` +
305
+ function duplicateDirectiveArgumentDefinitionsErrorMessage(argumentNames) {
306
+ return (` The following argument` +
307
+ (argumentNames.length > 1 ? 's are' : ' is') +
308
+ ` defined more than once: "` +
329
309
  argumentNames.join(string_constants_1.QUOTATION_JOIN) +
330
310
  `"`);
331
311
  }
312
+ function invalidArgumentValueErrorMessage(value, hostName, argumentName, expectedTypeString) {
313
+ return ` The value "${value}" provided to argument "${hostName}(${argumentName}: ...)" is not a valid "${expectedTypeString}" type.`;
314
+ }
332
315
  function invalidDirectiveArgumentTypeErrorMessage(required, argumentName, expectedKind, actualKind) {
333
316
  return (` The ${required ? 'required ' : ''}argument "${argumentName} must be type` +
334
317
  ` "${expectedKind}" and not type "${actualKind}".`);
335
318
  }
336
- function invalidKeyDirectiveArgumentErrorMessage(directiveKind) {
337
- return ` The required argument named "fields" must be type "String" and not type "${directiveKind}".`;
338
- }
339
319
  function invalidKeyDirectivesError(parentTypeName, errorMessages) {
340
320
  return new Error(`The entity "${parentTypeName}" defines the following invalid "key" directive` +
341
321
  (errorMessages.length > 1 ? 's' : '') +
@@ -350,8 +330,8 @@ function unexpectedKindFatalError(typeName) {
350
330
  return new Error(`Fatal: Unexpected type for "${typeName}"`);
351
331
  }
352
332
  function incompatibleParentKindFatalError(parentTypeName, expectedKind, actualKind) {
353
- return new Error(`Fatal: Expected "${parentTypeName}" to be type ${(0, utils_2.kindToTypeString)(expectedKind)}` +
354
- ` but received "${(0, utils_2.kindToTypeString)(actualKind)}".`);
333
+ return new Error(`Fatal: Expected "${parentTypeName}" to be type ${(0, utils_1.kindToTypeString)(expectedKind)}` +
334
+ ` but received "${(0, utils_1.kindToTypeString)(actualKind)}".`);
355
335
  }
356
336
  function unexpectedEdgeFatalError(typeName, edgeNames) {
357
337
  return new Error(`Fatal: The type "${typeName}" visited the following unexpected edge` +
@@ -380,9 +360,6 @@ function invalidConfigurationResultFatalError(fieldPath) {
380
360
  }
381
361
  exports.subgraphValidationFailureError = new Error(` Fatal: Subgraph validation did not return a valid AST.`);
382
362
  exports.federationFactoryInitializationFatalError = new Error('Fatal: FederationFactory was unsuccessfully initialized.');
383
- function unexpectedParentKindErrorMessage(parentTypeName, expectedTypeString, actualTypeString) {
384
- return ` Expected "${parentTypeName}" to be type ${expectedTypeString} but received "${actualTypeString}".`;
385
- }
386
363
  function unexpectedParentKindForChildError(parentTypeName, expectedTypeString, actualTypeString, childName, childTypeString) {
387
364
  return new Error(` Expected "${parentTypeName}" to be type ${expectedTypeString} but received "${actualTypeString}"` +
388
365
  ` when handling child "${childName}" of type "${childTypeString}".`);
@@ -394,7 +371,7 @@ function subgraphValidationError(subgraphName, errors) {
394
371
  errors.map((error) => error.message).join('\n'));
395
372
  }
396
373
  function invalidSubgraphNameErrorMessage(index, newName) {
397
- return (`The ${(0, utils_2.numberToOrdinal)(index + 1)} subgraph in the array did not define a name.` +
374
+ return (`The ${(0, utils_1.numberToOrdinal)(index + 1)} subgraph in the array did not define a name.` +
398
375
  ` Consequently, any further errors will temporarily identify this subgraph as "${newName}".`);
399
376
  }
400
377
  function invalidOperationTypeDefinitionError(existingOperationType, typeName, newOperationType) {
@@ -689,7 +666,7 @@ function undefinedEntityInterfaceImplementationsError(invalidEntityInterfacesByT
689
666
  let message = `Federation was unsuccessful because any one subgraph that defines a specific entity interface` +
690
667
  ` must also define each and every entity object that implements that entity interface.\n`;
691
668
  for (const [typeName, undefinedImplementations] of invalidEntityInterfacesByTypeName) {
692
- const entityInterfaceDatas = (0, utils_2.getOrThrowError)(entityInterfaceFederationDataByTypeName, typeName, 'entityInterfaceFederationDataByTypeName');
669
+ const entityInterfaceDatas = (0, utils_1.getOrThrowError)(entityInterfaceFederationDataByTypeName, typeName, 'entityInterfaceFederationDataByTypeName');
693
670
  const implementedConcreteTypeNames = entityInterfaceDatas.concreteTypeNames;
694
671
  message +=
695
672
  ` Across all subgraphs, the entity interface "${typeName}" is implemented by the following entity object` +
@@ -700,7 +677,7 @@ function undefinedEntityInterfaceImplementationsError(invalidEntityInterfacesByT
700
677
  ` However, the definition of at least one of these implementations is missing in a subgraph that` +
701
678
  ` defines the entity interface "${typeName}":\n`;
702
679
  for (const { subgraphName, concreteTypeNames } of undefinedImplementations) {
703
- const disparities = (0, utils_2.getEntriesNotInHashSet)(implementedConcreteTypeNames, concreteTypeNames);
680
+ const disparities = (0, utils_1.getEntriesNotInHashSet)(implementedConcreteTypeNames, concreteTypeNames);
704
681
  message +=
705
682
  ` Subgraph "${subgraphName}" does not define the following implementations: "` +
706
683
  disparities.join(string_constants_1.QUOTATION_JOIN) +
@@ -709,12 +686,10 @@ function undefinedEntityInterfaceImplementationsError(invalidEntityInterfacesByT
709
686
  }
710
687
  return new Error(message);
711
688
  }
712
- function orScopesLimitError(maxOrScopes, hostPaths) {
689
+ function orScopesLimitError(maxOrScopes, directiveCoords) {
713
690
  return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${maxOrScopes}.` +
714
- ` However, the following path` +
715
- (hostPaths.length > 1 ? 's attempt' : ' attempts') +
716
- ` to define more:\n "` +
717
- hostPaths.join(string_constants_1.QUOTATION_JOIN) +
691
+ ` However, the following coordinates attempt to define more:\n "` +
692
+ directiveCoords.join(string_constants_1.QUOTATION_JOIN) +
718
693
  `"\nIf you require more, please contact support.`);
719
694
  }
720
695
  function invalidEventDrivenGraphError(errorMessages) {
@@ -770,9 +745,6 @@ function invalidRootTypeFieldResponseTypesEventDrivenErrorMessage(invalidRespons
770
745
  }
771
746
  exports.invalidNatsStreamInputErrorMessage = `The "streamConfiguration" argument must be a valid input object with the following form:\n` +
772
747
  ` input edfs__NatsStreamConfiguration {\n consumerInactiveThreshold: Int! = 30\n consumerName: String!\n streamName: String!\n }`;
773
- function invalidArgumentValueErrorMessage(hostCoords, kind, value) {
774
- return (`The value ` + (value ? `"${value}" ` : ``) + `passed to "${hostCoords}" is not type "${(0, utils_2.kindToTypeString)(kind)}".`);
775
- }
776
748
  function invalidNatsStreamInputFieldsErrorMessage(missingRequiredFieldNames, duplicateRequiredFieldNames, invalidRequiredFieldNames, invalidFieldNames) {
777
749
  let message = exports.invalidNatsStreamInputErrorMessage;
778
750
  const errorMessages = [];
@@ -862,9 +834,6 @@ function nonKeyComposingObjectTypeNamesEventDrivenErrorMessage(typeNames) {
862
834
  }
863
835
  exports.invalidEdfsPublishResultObjectErrorMessage = ` The object "edfs__PublishResult" that was defined in the Event Driven graph is invalid and must instead have` +
864
836
  ` the following definition:\n type edfs__PublishResult {\n success: Boolean!\n }`;
865
- exports.undefinedNatsStreamConfigurationInputErrorMessage = ` The input object "edfs__NatsStreamConfiguration" must be defined in the event-driven graph to satisfy the` +
866
- ` "@edfs__natsSubscribe" directive.\n The following input must be defined in the event-driven graph:\n` +
867
- ` input edfs__NatsStreamConfiguration {\n consumerInactiveThreshold: Int! = 30\n consumerName: String!\n streamName: String!\n }`;
868
837
  exports.invalidNatsStreamConfigurationDefinitionErrorMessage = ` The input object "edfs__NatsStreamConfiguration" that was defined in the Event Driven graph is invalid and must` +
869
838
  ` instead have the following definition:\n input edfs__NatsStreamConfiguration {\n consumerInactiveThreshold: Int! = 30\n` +
870
839
  ` consumerName: String!\n streamName: String!\n }`;
@@ -1131,4 +1100,34 @@ function invalidExternalDirectiveError(fieldCoords) {
1131
1100
  ` necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the` +
1132
1101
  ` "@external" directive should be removed.`);
1133
1102
  }
1103
+ function configureDescriptionNoDescriptionError(typeString, typeName) {
1104
+ return new Error(`The "@openfed__configureDescription" directive defined on ${typeString} "${typeName}" is invalid` +
1105
+ ` because neither a description nor the "descriptionOverride" argument is defined.`);
1106
+ }
1107
+ function configureDescriptionPropagationError(coords, subgraphNames) {
1108
+ return new Error(`The coordinates "${coords}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs:\n "` +
1109
+ subgraphNames.join(string_constants_1.QUOTATION_JOIN) +
1110
+ '"\n' +
1111
+ `A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`);
1112
+ }
1113
+ function duplicateDirectiveDefinitionArgumentErrorMessage(argumentNames) {
1114
+ return (`- The following argument` +
1115
+ (argumentNames.length > 1 ? 's are' : ' is') +
1116
+ ' defined more than once:\n "' +
1117
+ argumentNames.join(string_constants_1.QUOTATION_JOIN) +
1118
+ '"');
1119
+ }
1120
+ function duplicateDirectiveDefinitionLocationErrorMessage(locationName) {
1121
+ return `- The location "${locationName}" is defined multiple times.`;
1122
+ }
1123
+ function invalidDirectiveDefinitionLocationErrorMessage(locationName) {
1124
+ return `- "${locationName}" is not a valid directive location.`;
1125
+ }
1126
+ function invalidDirectiveDefinitionError(directiveName, errorMessages) {
1127
+ return new Error(`The directive definition for "@${directiveName}" is invalid for the following reason` +
1128
+ (errorMessages.length > 1 ? 's' : '') +
1129
+ ':\n' +
1130
+ errorMessages.join(string_constants_1.LITERAL_NEW_LINE) +
1131
+ '"');
1132
+ }
1134
1133
  //# sourceMappingURL=errors.js.map