@wundergraph/composition 0.58.0 → 0.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/dist/{v1/normalization → directive-definition-data}/directive-definition-data.d.ts +2 -2
  2. package/dist/{v1/normalization → directive-definition-data}/directive-definition-data.js +308 -280
  3. package/dist/directive-definition-data/directive-definition-data.js.map +1 -0
  4. package/dist/directive-definition-data/types/params.d.ts +48 -0
  5. package/dist/directive-definition-data/types/params.js.map +1 -0
  6. package/dist/directive-definition-data/types/types.d.ts +39 -0
  7. package/dist/directive-definition-data/types/types.js.map +1 -0
  8. package/dist/directive-definition-data/utils.d.ts +5 -0
  9. package/dist/directive-definition-data/utils.js +75 -0
  10. package/dist/directive-definition-data/utils.js.map +1 -0
  11. package/dist/errors/errors.d.ts +35 -9
  12. package/dist/errors/errors.js +141 -21
  13. package/dist/errors/errors.js.map +1 -1
  14. package/dist/errors/{types.d.ts → types/params.d.ts} +34 -6
  15. package/dist/{federation → errors/types}/params.js.map +1 -1
  16. package/dist/errors/types/types.d.ts +5 -0
  17. package/dist/{federation → errors/types}/types.js.map +1 -1
  18. package/dist/federation/federation.d.ts +2 -2
  19. package/dist/federation/{params.d.ts → types/params.d.ts} +4 -4
  20. package/dist/{v1/federation → federation/types}/params.js.map +1 -1
  21. package/dist/federation/{types.d.ts → types/types.d.ts} +17 -20
  22. package/dist/{errors → federation/types}/types.js.map +1 -1
  23. package/dist/index.d.ts +21 -7
  24. package/dist/index.js +22 -7
  25. package/dist/index.js.map +1 -1
  26. package/dist/normalization/normalization.d.ts +2 -3
  27. package/dist/normalization/normalization.js +0 -8
  28. package/dist/normalization/normalization.js.map +1 -1
  29. package/dist/normalization/types.d.ts +21 -18
  30. package/dist/schema-building/ast.d.ts +2 -10
  31. package/dist/schema-building/ast.js +35 -32
  32. package/dist/schema-building/ast.js.map +1 -1
  33. package/dist/schema-building/types/params.d.ts +54 -0
  34. package/dist/schema-building/types/params.js.map +1 -0
  35. package/dist/schema-building/types/results.d.ts +39 -0
  36. package/dist/schema-building/types/results.js +3 -0
  37. package/dist/schema-building/types/results.js.map +1 -0
  38. package/dist/schema-building/{types.d.ts → types/types.d.ts} +21 -41
  39. package/dist/schema-building/types/types.js.map +1 -0
  40. package/dist/schema-building/utils.d.ts +21 -13
  41. package/dist/schema-building/utils.js +257 -82
  42. package/dist/schema-building/utils.js.map +1 -1
  43. package/dist/subgraph/types/params.d.ts +6 -0
  44. package/dist/subgraph/types/params.js +3 -0
  45. package/dist/{schema-building → subgraph/types}/params.js.map +1 -1
  46. package/dist/subgraph/types.d.ts +6 -6
  47. package/dist/subgraph/utils.d.ts +3 -0
  48. package/dist/subgraph/utils.js +23 -0
  49. package/dist/subgraph/utils.js.map +1 -0
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/dist/types/results.d.ts +14 -0
  52. package/dist/types/results.js +3 -0
  53. package/dist/types/results.js.map +1 -0
  54. package/dist/types/types.d.ts +2 -0
  55. package/dist/utils/composition-version.js +1 -1
  56. package/dist/utils/params.d.ts +4 -0
  57. package/dist/utils/string-constants.d.ts +2 -1
  58. package/dist/utils/string-constants.js +5 -4
  59. package/dist/utils/string-constants.js.map +1 -1
  60. package/dist/utils/utils.d.ts +2 -1
  61. package/dist/utils/utils.js +14 -0
  62. package/dist/utils/utils.js.map +1 -1
  63. package/dist/v1/constants/directive-definitions.js +3 -3
  64. package/dist/v1/constants/directive-definitions.js.map +1 -1
  65. package/dist/v1/constants/strings.d.ts +3 -1
  66. package/dist/v1/constants/strings.js +12 -2
  67. package/dist/v1/constants/strings.js.map +1 -1
  68. package/dist/v1/federation/federation-factory.d.ts +15 -16
  69. package/dist/v1/federation/federation-factory.js +344 -213
  70. package/dist/v1/federation/federation-factory.js.map +1 -1
  71. package/dist/v1/federation/{params.d.ts → types/params.d.ts} +16 -9
  72. package/dist/v1/federation/types/params.js +3 -0
  73. package/dist/v1/federation/types/params.js.map +1 -0
  74. package/dist/v1/federation/utils.d.ts +2 -2
  75. package/dist/v1/normalization/batch-normalization/batch-normalizer.d.ts +37 -0
  76. package/dist/v1/normalization/batch-normalization/batch-normalizer.js +245 -0
  77. package/dist/v1/normalization/batch-normalization/batch-normalizer.js.map +1 -0
  78. package/dist/v1/normalization/batch-normalization/types/params.d.ts +6 -0
  79. package/dist/v1/normalization/batch-normalization/types/params.js +3 -0
  80. package/dist/v1/normalization/batch-normalization/types/params.js.map +1 -0
  81. package/dist/v1/normalization/normalization-factory.d.ts +20 -17
  82. package/dist/v1/normalization/normalization-factory.js +194 -424
  83. package/dist/v1/normalization/normalization-factory.js.map +1 -1
  84. package/dist/v1/normalization/{params.d.ts → types/params.d.ts} +6 -12
  85. package/dist/v1/normalization/types/params.js +3 -0
  86. package/dist/v1/normalization/types/params.js.map +1 -0
  87. package/dist/v1/normalization/types/results.d.ts +26 -0
  88. package/dist/v1/normalization/types/results.js +3 -0
  89. package/dist/v1/normalization/types/results.js.map +1 -0
  90. package/dist/v1/normalization/{types.d.ts → types/types.d.ts} +37 -19
  91. package/dist/v1/normalization/types/types.js +3 -0
  92. package/dist/v1/normalization/types/types.js.map +1 -0
  93. package/dist/v1/normalization/utils.d.ts +9 -2
  94. package/dist/v1/normalization/utils.js +308 -2
  95. package/dist/v1/normalization/utils.js.map +1 -1
  96. package/dist/v1/normalization/walkers.js +2 -1
  97. package/dist/v1/normalization/walkers.js.map +1 -1
  98. package/dist/v1/schema-building/type-merging.d.ts +1 -1
  99. package/dist/v1/utils/utils.d.ts +2 -3
  100. package/dist/v1/utils/utils.js +0 -17
  101. package/dist/v1/utils/utils.js.map +1 -1
  102. package/dist/v1/warnings/params.d.ts +6 -1
  103. package/dist/v1/warnings/warnings.d.ts +4 -1
  104. package/dist/v1/warnings/warnings.js +23 -0
  105. package/dist/v1/warnings/warnings.js.map +1 -1
  106. package/dist/validation/types/params.d.ts +22 -0
  107. package/dist/validation/types/params.js +3 -0
  108. package/dist/{v1/normalization → validation/types}/params.js.map +1 -1
  109. package/dist/validation/validation.d.ts +5 -0
  110. package/dist/validation/validation.js +213 -0
  111. package/dist/validation/validation.js.map +1 -0
  112. package/package.json +10 -4
  113. package/dist/schema-building/params.d.ts +0 -8
  114. package/dist/schema-building/types.js.map +0 -1
  115. package/dist/v1/normalization/directive-definition-data.js.map +0 -1
  116. package/dist/v1/normalization/types.js.map +0 -1
  117. /package/dist/{federation → directive-definition-data/types}/params.js +0 -0
  118. /package/dist/{errors → directive-definition-data/types}/types.js +0 -0
  119. /package/dist/{schema-building → errors/types}/params.js +0 -0
  120. /package/dist/{federation → errors/types}/types.js +0 -0
  121. /package/dist/{v1/federation → federation/types}/params.js +0 -0
  122. /package/dist/{v1/normalization → federation/types}/types.js +0 -0
  123. /package/dist/{v1/normalization → schema-building/types}/params.js +0 -0
  124. /package/dist/schema-building/{types.js → types/types.js} +0 -0
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchNormalizer = void 0;
4
+ const graph_1 = require("../../../resolvability-graph/graph");
5
+ const errors_1 = require("../../../errors/errors");
6
+ const utils_1 = require("../../utils/utils");
7
+ const utils_2 = require("../../../utils/utils");
8
+ const utils_3 = require("../utils");
9
+ const warnings_1 = require("../../warnings/warnings");
10
+ const constants_1 = require("../../constants/constants");
11
+ const normalization_factory_1 = require("../normalization-factory");
12
+ const utils_4 = require("../../../subgraph/utils");
13
+ class BatchNormalizer {
14
+ authorizationDataByParentTypeName = new Map();
15
+ concreteTypeNamesByAbstractTypeName = new Map();
16
+ entityDataByTypeName = new Map();
17
+ errors = [];
18
+ executableDirectiveDatasByName = new Map();
19
+ federatedDirectiveDataByName = new Map();
20
+ importDataByDirectiveName = new Map();
21
+ interfaceImplementationTypeNamesByInterfaceTypeName = new Map();
22
+ internalSubgraphBySubgraphName = new Map();
23
+ overriddenFieldNamesByParentTypeNameByTargetSubgraphName = new Map();
24
+ overrideSourceSubgraphNamesByFieldCoords = new Map();
25
+ duplicateOverriddenFieldCoords = new Set();
26
+ subgraphNames = new Set();
27
+ invalidORScopesCoords = new Set();
28
+ fieldCoordsByNamedTypeName = new Map();
29
+ subgraphs;
30
+ warnings = [];
31
+ validationErrors = [];
32
+ options;
33
+ constructor({ options, subgraphs }) {
34
+ this.options = options;
35
+ this.subgraphs = subgraphs;
36
+ const duplicateSubgraphNames = new Set();
37
+ for (const { name } of subgraphs) {
38
+ if (!name) {
39
+ this.errors.push(errors_1.noSubgraphNameError);
40
+ break;
41
+ }
42
+ if (this.subgraphNames.has(name)) {
43
+ duplicateSubgraphNames.add(name);
44
+ }
45
+ else {
46
+ this.subgraphNames.add(name);
47
+ }
48
+ }
49
+ if (duplicateSubgraphNames.size > 0) {
50
+ this.errors.push((0, errors_1.duplicateSubgraphNamesError)([...duplicateSubgraphNames]));
51
+ }
52
+ }
53
+ handleLinkImports(importDataByDirectiveName) {
54
+ for (const [directiveName, importData] of importDataByDirectiveName) {
55
+ const existingData = this.importDataByDirectiveName.get(directiveName);
56
+ if (!existingData) {
57
+ this.importDataByDirectiveName.set(directiveName, importData);
58
+ continue;
59
+ }
60
+ if (existingData.coreUrl !== importData.coreUrl) {
61
+ // TODO handle duplicates
62
+ this.errors.push((0, errors_1.nonEqualCoreFeatureComposeDirectiveError)(directiveName));
63
+ continue;
64
+ }
65
+ if (existingData.majorVersion !== importData.majorVersion) {
66
+ this.errors.push((0, errors_1.nonEqualComposeDirectiveMajorVersionError)(directiveName));
67
+ }
68
+ if (existingData.minorVersion < importData.minorVersion) {
69
+ existingData.minorVersion = importData.minorVersion;
70
+ existingData.node = importData.node;
71
+ }
72
+ }
73
+ }
74
+ handleEntityData(entityDataByTypeName, subgraphName) {
75
+ for (const [typeName, entityData] of entityDataByTypeName) {
76
+ const keyFieldSetDataByFieldSet = entityData.keyFieldSetDatasBySubgraphName.get(subgraphName);
77
+ if (!keyFieldSetDataByFieldSet) {
78
+ continue;
79
+ }
80
+ (0, utils_1.upsertEntityData)({
81
+ entityDataByTypeName: this.entityDataByTypeName,
82
+ keyFieldSetDataByFieldSet,
83
+ typeName,
84
+ subgraphName,
85
+ });
86
+ }
87
+ }
88
+ handleOverrides({ originalTypeNameByRenamedTypeName, overriddenFieldNamesByParentTypeNameByTargetSubgraphName, subgraphName, }) {
89
+ for (const [targetSubgraphName, overriddenFieldNamesByTypeName,] of overriddenFieldNamesByParentTypeNameByTargetSubgraphName) {
90
+ const isTargetValid = this.subgraphNames.has(targetSubgraphName);
91
+ for (const [parentTypeName, fieldNames] of overriddenFieldNamesByTypeName) {
92
+ /* It's possible for a renamed root type to have a field overridden, so make sure any errors at this stage are
93
+ propagated with the original typename. */
94
+ const originalParentTypeName = originalTypeNameByRenamedTypeName.get(parentTypeName) ?? parentTypeName;
95
+ if (!isTargetValid) {
96
+ this.warnings.push((0, warnings_1.invalidOverrideTargetSubgraphNameWarning)(targetSubgraphName, originalParentTypeName, [...fieldNames], subgraphName));
97
+ }
98
+ else {
99
+ const existingOverriddenFieldNamesByParentTypeName = (0, utils_2.getValueOrDefault)(this.overriddenFieldNamesByParentTypeNameByTargetSubgraphName, targetSubgraphName, () => new Map());
100
+ const existingFieldNames = (0, utils_2.getValueOrDefault)(existingOverriddenFieldNamesByParentTypeName, parentTypeName, () => new Set(fieldNames));
101
+ (0, utils_2.addIterableToSet)({
102
+ source: fieldNames,
103
+ target: existingFieldNames,
104
+ });
105
+ }
106
+ for (const fieldName of fieldNames) {
107
+ const fieldCoords = `${originalParentTypeName}.${fieldName}`;
108
+ const sourceSubgraphs = this.overrideSourceSubgraphNamesByFieldCoords.get(fieldCoords);
109
+ if (!sourceSubgraphs) {
110
+ this.overrideSourceSubgraphNamesByFieldCoords.set(fieldCoords, [subgraphName]);
111
+ continue;
112
+ }
113
+ sourceSubgraphs.push(subgraphName);
114
+ this.duplicateOverriddenFieldCoords.add(fieldCoords);
115
+ }
116
+ }
117
+ }
118
+ }
119
+ handleOverrideConfigurationData() {
120
+ for (const [targetSubgraphName, overriddenFieldNamesByParentTypeName] of this
121
+ .overriddenFieldNamesByParentTypeNameByTargetSubgraphName) {
122
+ const internalSubgraph = this.internalSubgraphBySubgraphName.get(targetSubgraphName);
123
+ if (!internalSubgraph) {
124
+ this.errors.push((0, errors_1.unknownSubgraphNameError)(targetSubgraphName));
125
+ continue;
126
+ }
127
+ internalSubgraph.overriddenFieldNamesByParentTypeName = overriddenFieldNamesByParentTypeName;
128
+ for (const [parentTypeName, fieldNames] of overriddenFieldNamesByParentTypeName) {
129
+ const configurationData = internalSubgraph.configurationDataByTypeName.get(parentTypeName);
130
+ if (!configurationData) {
131
+ continue;
132
+ }
133
+ (0, utils_1.subtractSet)(fieldNames, configurationData.fieldNames);
134
+ if (configurationData.fieldNames.size < 1) {
135
+ internalSubgraph.configurationDataByTypeName.delete(parentTypeName);
136
+ }
137
+ }
138
+ }
139
+ }
140
+ batchNormalize() {
141
+ // Federation is aborted due to subgraph naming errors
142
+ if (this.errors.length > 0) {
143
+ return {
144
+ errors: this.errors,
145
+ success: false,
146
+ warnings: this.warnings,
147
+ };
148
+ }
149
+ const internalGraph = new graph_1.Graph();
150
+ for (const subgraph of this.subgraphs) {
151
+ const subgraphName = subgraph.name;
152
+ const normalizationResult = (0, normalization_factory_1.normalizeSubgraph)({
153
+ document: subgraph.definitions,
154
+ internalGraph,
155
+ options: this.options,
156
+ subgraphName,
157
+ });
158
+ if (normalizationResult.warnings.length > 0) {
159
+ this.warnings.push(...normalizationResult.warnings);
160
+ }
161
+ if (!normalizationResult.success) {
162
+ this.validationErrors.push((0, errors_1.subgraphValidationError)(subgraphName, normalizationResult.errors));
163
+ continue;
164
+ }
165
+ this.handleLinkImports(normalizationResult.importDataByDirectiveName);
166
+ for (const authorizationData of normalizationResult.authorizationDataByParentTypeName.values()) {
167
+ (0, utils_1.upsertAuthorizationData)(this.authorizationDataByParentTypeName, authorizationData, this.invalidORScopesCoords);
168
+ }
169
+ for (const [namedTypeName, fieldCoords] of normalizationResult.fieldCoordsByNamedTypeName) {
170
+ (0, utils_2.addIterableToSet)({
171
+ source: fieldCoords,
172
+ target: (0, utils_2.getValueOrDefault)(this.fieldCoordsByNamedTypeName, namedTypeName, () => new Set()),
173
+ });
174
+ }
175
+ (0, utils_2.mergeSetValueMap)({
176
+ source: normalizationResult.concreteTypeNamesByAbstractTypeName,
177
+ target: this.concreteTypeNamesByAbstractTypeName,
178
+ });
179
+ (0, utils_2.mergeSetValueMap)({
180
+ source: normalizationResult.interfaceImplementationTypeNamesByInterfaceTypeName,
181
+ target: this.interfaceImplementationTypeNamesByInterfaceTypeName,
182
+ });
183
+ this.handleEntityData(normalizationResult.entityDataByTypeName, subgraphName);
184
+ (0, utils_3.upsertFederatedDirectiveData)({
185
+ executableDirectiveDatasByName: this.executableDirectiveDatasByName,
186
+ existingDataByName: this.federatedDirectiveDataByName,
187
+ incomingDataByName: normalizationResult.federatedDirectiveDataByName,
188
+ });
189
+ this.internalSubgraphBySubgraphName.set(subgraphName, (0, utils_4.internalSubgraphFromNormalization)({ normalization: normalizationResult, subgraphName }));
190
+ this.handleOverrides({
191
+ originalTypeNameByRenamedTypeName: normalizationResult.originalTypeNameByRenamedTypeName,
192
+ overriddenFieldNamesByParentTypeNameByTargetSubgraphName: normalizationResult.overriddenFieldNamesByParentTypeNameByTargetSubgraphName,
193
+ subgraphName,
194
+ });
195
+ }
196
+ if (this.invalidORScopesCoords.size > 0) {
197
+ this.errors.push((0, errors_1.orScopesLimitError)(constants_1.MAX_OR_SCOPES, [...this.invalidORScopesCoords]));
198
+ }
199
+ if (this.duplicateOverriddenFieldCoords.size > 0) {
200
+ const duplicateOverriddenFieldErrorMessages = [];
201
+ for (const fieldCoords of this.duplicateOverriddenFieldCoords) {
202
+ const sourceSubgraphNames = (0, utils_2.getOrThrowError)(this.overrideSourceSubgraphNamesByFieldCoords, fieldCoords, 'overrideSourceSubgraphNamesByFieldCoords');
203
+ duplicateOverriddenFieldErrorMessages.push((0, errors_1.duplicateOverriddenFieldErrorMessage)(fieldCoords, sourceSubgraphNames));
204
+ }
205
+ this.errors.push((0, errors_1.duplicateOverriddenFieldsError)(duplicateOverriddenFieldErrorMessages));
206
+ }
207
+ for (const [directiveName, executableDirectiveDatas] of this.executableDirectiveDatasByName) {
208
+ if (this.federatedDirectiveDataByName.has(directiveName) ||
209
+ executableDirectiveDatas.length !== this.subgraphNames.size) {
210
+ this.executableDirectiveDatasByName.delete(directiveName);
211
+ }
212
+ }
213
+ this.errors.push(...this.validationErrors);
214
+ if (this.errors.length > 0) {
215
+ return {
216
+ errors: this.errors,
217
+ success: false,
218
+ warnings: this.warnings,
219
+ };
220
+ }
221
+ this.handleOverrideConfigurationData();
222
+ if (this.errors.length > 0) {
223
+ return {
224
+ errors: this.errors,
225
+ success: false,
226
+ warnings: this.warnings,
227
+ };
228
+ }
229
+ return {
230
+ authorizationDataByParentTypeName: this.authorizationDataByParentTypeName,
231
+ concreteTypeNamesByAbstractTypeName: this.concreteTypeNamesByAbstractTypeName,
232
+ entityDataByTypeName: this.entityDataByTypeName,
233
+ executableDirectiveDatasByName: this.executableDirectiveDatasByName,
234
+ federatedDirectiveDataByName: this.federatedDirectiveDataByName,
235
+ fieldCoordsByNamedTypeName: this.fieldCoordsByNamedTypeName,
236
+ interfaceImplementationTypeNamesByInterfaceTypeName: this.interfaceImplementationTypeNamesByInterfaceTypeName,
237
+ internalSubgraphByName: this.internalSubgraphBySubgraphName,
238
+ internalGraph,
239
+ success: true,
240
+ warnings: this.warnings,
241
+ };
242
+ }
243
+ }
244
+ exports.BatchNormalizer = BatchNormalizer;
245
+ //# sourceMappingURL=batch-normalizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-normalizer.js","sourceRoot":"","sources":["../../../../src/v1/normalization/batch-normalization/batch-normalizer.ts"],"names":[],"mappings":";;;AAcA,8DAA2D;AAC3D,mDAUgC;AAChC,6CAA2F;AAC3F,gDAA8G;AAC9G,oCAAwD;AACxD,sDAAmF;AACnF,yDAA0D;AAC1D,oEAA6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gBAAgB,CAAC,CAAC;QAE3C,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC;QACJ,CAAC;QAED,OAAO;YACL,iCAAiC,EAAE,IAAI,CAAC,iCAAiC;YACzE,mCAAmC,EAAE,IAAI,CAAC,mCAAmC;YAC7E,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,8BAA8B,EAAE,IAAI,CAAC,8BAA8B;YACnE,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;YAC/D,0BAA0B,EAAE,IAAI,CAAC,0BAA0B;YAC3D,mDAAmD,EAAE,IAAI,CAAC,mDAAmD;YAC7G,sBAAsB,EAAE,IAAI,CAAC,8BAA8B;YAC3D,aAAa;YACb,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;IACJ,CAAC;CACF;AA7RD,0CA6RC"}
@@ -0,0 +1,6 @@
1
+ import { type FieldName, type SubgraphName, type TypeName } from '../../../../types/types';
2
+ export type HandleOverridesParams = {
3
+ originalTypeNameByRenamedTypeName: Map<TypeName, TypeName>;
4
+ overriddenFieldNamesByParentTypeNameByTargetSubgraphName: Map<SubgraphName, Map<TypeName, Set<FieldName>>>;
5
+ subgraphName: SubgraphName;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.js","sourceRoot":"","sources":["../../../../../src/v1/normalization/batch-normalization/types/params.ts"],"names":[],"mappings":""}
@@ -1,16 +1,19 @@
1
- import { type ConstDirectiveNode, type ConstValueNode, type DirectiveDefinitionNode, type DocumentNode, type EnumValueDefinitionNode, type FieldDefinitionNode, type InputValueDefinitionNode, type InterfaceTypeDefinitionNode, Kind, type NamedTypeNode, OperationTypeNode, type SchemaDefinitionNode, type SchemaExtensionNode, type TypeDefinitionNode, type TypeExtensionNode, type TypeNode } from 'graphql';
1
+ import { type ConstDirectiveNode, type DirectiveDefinitionNode, type DocumentNode, type EnumValueDefinitionNode, type FieldDefinitionNode, type InputValueDefinitionNode, type InterfaceTypeDefinitionNode, Kind, type NamedTypeNode, OperationTypeNode, type TypeDefinitionNode, type TypeExtensionNode } from 'graphql';
2
2
  import { type EnumTypeNode, type InputObjectTypeNode, type InterfaceTypeNode, type ObjectTypeNode, type ScalarTypeNode, type SchemaNode, type UnionTypeNode } from '../../ast/utils';
3
3
  import { type ConfigurationData, type Costs, type EventConfiguration, type FieldWeightConfiguration, type NatsEventType, type RequiredFieldConfiguration } from '../../router-configuration/types';
4
- import { type AuthorizationData, type CompositeOutputData, type ConditionalFieldData, type EntityData, type EntityInterfaceSubgraphData, type DirectiveDefinitionData, type EnumDefinitionData, ExtensionType, type FieldData, type InputObjectDefinitionData, type InputValueData, type NodeData, type ObjectDefinitionData, type ParentDefinitionData, type PersistedDirectiveDefinitionData, type ScalarDefinitionData, type SchemaData, type UnionDefinitionData } from '../../schema-building/types';
4
+ import { type AuthorizationData, type CompositeOutputData, type ConditionalFieldData, type EntityData, type EntityInterfaceSubgraphData, type EnumDefinitionData, ExtensionType, type FieldData, type InputObjectDefinitionData, type InputValueData, type NodeData, type ObjectDefinitionData, type ParentDefinitionData, type ScalarDefinitionData, type SchemaData, type UnionDefinitionData } from '../../schema-building/types/types';
5
5
  import { type CompositeOutputNode } from '../../schema-building/ast';
6
- import { type InvalidRootTypeFieldEventsDirectiveData } from '../../errors/types';
6
+ import { type InvalidRootTypeFieldEventsDirectiveData } from '../../errors/types/types';
7
7
  import { Graph } from '../../resolvability-graph/graph';
8
8
  import { type Warning } from '../../warnings/types';
9
- import { type BatchNormalizationResult, type NormalizationResult } from '../../normalization/types';
10
- import { type AddInputValueDataByNodeParams, type ConditionalFieldSetValidationResult, type ExtractArgumentDataResult, type FieldSetData, type FieldSetParentResult, type HandleCostDirectiveParams, type HandleListSizeDirectiveParams, type RecordDirectiveWeightOnFieldParams, type HandleOverrideDirectiveParams, type HandleRequiresScopesDirectiveParams, type HandleSemanticNonNullDirectiveParams, type KeyFieldSetData, type UpsertInputObjectResult, type ValidateDirectiveParams } from './types';
11
- import { type AbstractTypeName, type FieldName, type SubgraphName, type TypeName } from '../../types/types';
12
- import { type BatchNormalizeParams, type HandleFieldInheritableDirectivesParams, type NormalizationFactoryParams, type NormalizeSubgraphFromStringParams, type NormalizeSubgraphParams, type SanitizeDefaultValueParams, type ValidateOneOfDirectiveParams } from './params';
9
+ import { type NormalizationResult } from '../../normalization/types';
10
+ import { type AddInputValueDataByNodeParams, type ComposeDirectiveNode, type ConditionalFieldSetValidationResult, type ExtractDirectiveArgumentDataResult, type FieldSetData, type FieldSetParentResult, type HandleCostDirectiveParams, type HandleListSizeDirectiveParams, type RecordDirectiveWeightOnFieldParams, type HandleOverrideDirectiveParams, type HandleRequiresScopesDirectiveParams, type HandleSemanticNonNullDirectiveParams, type KeyFieldSetData, type LinkImportData, type UpsertInputObjectResult, type ValidateDirectiveParams } from './types/types';
11
+ import { type AbstractTypeName, type ArgumentName, type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../../types/types';
12
+ import { type HandleFieldInheritableDirectivesParams, type NormalizationFactoryParams, type NormalizeSubgraphFromStringParams, type NormalizeSubgraphParams, type ValidateOneOfDirectiveParams } from './types/params';
13
13
  import type { CompositionOptions } from '../../types/params';
14
+ import { type SchemaNodeResult } from './types/results';
15
+ import { type AddDirectiveArgumentDataByNodeParams, type ExtractDirectiveArgumentDataParams } from '../../directive-definition-data/types/params';
16
+ import { type DirectiveArgumentData, type DirectiveDefinitionData } from '../../directive-definition-data/types/types';
14
17
  export declare function normalizeSubgraphFromString({ noLocation, options, sdlString, }: NormalizeSubgraphFromStringParams): NormalizationResult;
15
18
  export declare function normalizeSubgraph({ document, internalGraph, options, subgraphName, }: NormalizeSubgraphParams): NormalizationResult;
16
19
  export declare class NormalizationFactory {
@@ -31,7 +34,9 @@ export declare class NormalizationFactory {
31
34
  entityDataByTypeName: Map<string, EntityData>;
32
35
  entityInterfaceDataByTypeName: Map<string, EntityInterfaceSubgraphData>;
33
36
  eventsConfigurations: Map<string, EventConfiguration[]>;
37
+ federatedDirectiveDataByName: Map<string, DirectiveDefinitionData>;
34
38
  fieldSetDataByTypeName: Map<string, FieldSetData>;
39
+ importDataByDirectiveName: Map<string, LinkImportData>;
35
40
  interfaceImplementationTypeNamesByInterfaceTypeName: Map<string, Set<string>>;
36
41
  internalGraph: Graph;
37
42
  invalidConfigureDescriptionNodeDatas: Array<NodeData>;
@@ -52,24 +57,24 @@ export declare class NormalizationFactory {
52
57
  operationTypeNodeByTypeName: Map<string, OperationTypeNode>;
53
58
  originalParentTypeName: string;
54
59
  originalTypeNameByRenamedTypeName: Map<string, string>;
55
- overridesByTargetSubgraphName: Map<string, Map<string, Set<string>>>;
60
+ overriddenFieldNamesByTypeNameByTargetSubgraphName: Map<string, Map<string, Set<string>>>;
56
61
  parentDefinitionDataByTypeName: Map<string, ParentDefinitionData>;
57
- schemaData: SchemaData;
58
62
  referencedDirectiveNames: Set<string>;
59
63
  referencedTypeNames: Set<string>;
60
64
  renamedParentTypeName: string;
65
+ schemaData: SchemaData;
61
66
  subgraphName: SubgraphName;
62
67
  unvalidatedExternalFieldCoords: Set<string>;
63
68
  usesEdfsNatsStreamConfiguration: boolean;
64
69
  warnings: Array<Warning>;
65
70
  constructor({ internalGraph, options, subgraphName }: NormalizationFactoryParams);
66
- sanitizeDefaultValue({ data, namedTypeData, node }: SanitizeDefaultValueParams): void;
67
71
  validateArguments(fieldData: FieldData, parentKind: Kind): void;
68
72
  isTypeNameRootType(typeName: string): boolean;
69
- isArgumentValueValid(typeNode: TypeNode, argumentValue: ConstValueNode): boolean;
70
73
  handleFieldInheritableDirectives({ directivesByName, fieldName, inheritedDirectiveNames, parentData, }: HandleFieldInheritableDirectivesParams): void;
71
74
  extractDirectives(node: TypeDefinitionNode | TypeExtensionNode | FieldDefinitionNode | InputValueDefinitionNode | EnumValueDefinitionNode | SchemaNode, directivesByName: Map<string, Array<ConstDirectiveNode>>): Map<string, ConstDirectiveNode[]>;
72
75
  validateDirective({ data, definitionData, directiveCoords, directiveNode, errorMessages, requiredArgumentNames, }: ValidateDirectiveParams): Array<string>;
76
+ handleComposeDirective(node: ComposeDirectiveNode): void;
77
+ handleExecutableDirectives(): void;
73
78
  validateDirectives(data: NodeData | SchemaData, directiveCoords: string): void;
74
79
  getNodeExtensionType(isRealExtension: boolean, directivesByName: Map<string, Array<ConstDirectiveNode>>, isRootType?: boolean): ExtensionType;
75
80
  setParentDataExtensionType(parentData: ParentDefinitionData, incomingExtensionType: ExtensionType): void;
@@ -79,12 +84,11 @@ export declare class NormalizationFactory {
79
84
  updateCompositeOutputDataByNode(node: CompositeOutputNode, data: CompositeOutputData, extensionType: ExtensionType): void;
80
85
  addConcreteTypeNamesForImplementedInterfaces(interfaceTypeNames: Set<AbstractTypeName>, concreteTypeName: TypeName): void;
81
86
  extractArguments(argumentDataByName: Map<string, InputValueData>, node: FieldDefinitionNode): Map<string, InputValueData>;
82
- addPersistedDirectiveDefinitionDataByNode(persistedDirectiveDefinitionDataByDirectiveName: Map<string, PersistedDirectiveDefinitionData>, node: DirectiveDefinitionNode, executableLocations: Set<string>): void;
83
- extractDirectiveLocations(node: DirectiveDefinitionNode, errorMessages: Array<string>): Set<string>;
84
- extractArgumentData(argumentNodes: ReadonlyArray<InputValueDefinitionNode> | Array<InputValueDefinitionNode> | undefined, errorMessages: Array<string>): ExtractArgumentDataResult;
87
+ extractDirectiveArgumentData({ argumentNodes, directiveName, errorMessages, }: ExtractDirectiveArgumentDataParams): ExtractDirectiveArgumentDataResult;
85
88
  extractDirectiveArgumentCosts(node: DirectiveDefinitionNode): void;
89
+ addDirectiveArgumentDataByNode({ directiveName, node, optionalArgumentNames, requiredArgumentNames, }: AddDirectiveArgumentDataByNodeParams): DirectiveArgumentData;
86
90
  addDirectiveDefinitionDataByNode(node: DirectiveDefinitionNode): boolean;
87
- addFieldDataByNode(fieldDataByFieldName: Map<string, FieldData>, node: FieldDefinitionNode, argumentDataByArgumentName: Map<string, InputValueData>, directivesByName: Map<string, ConstDirectiveNode[]>, inheritedDirectiveNames?: Set<string>): FieldData;
91
+ addFieldDataByNode(fieldDataByName: Map<FieldName, FieldData>, node: FieldDefinitionNode, argumentDataByName: Map<ArgumentName, InputValueData>, directivesByName: Map<DirectiveName, ConstDirectiveNode[]>, inheritedDirectiveNames?: Set<string>): FieldData;
88
92
  addInputValueDataByNode({ fieldName, inputValueDataByName, isArgument, node, originalParentTypeName, renamedParentTypeName, }: AddInputValueDataByNodeParams): void;
89
93
  upsertInterfaceDataByNode(node: InterfaceTypeNode, isRealExtension?: boolean): void;
90
94
  getRenamedRootTypeName(typeName: string): string;
@@ -132,7 +136,7 @@ export declare class NormalizationFactory {
132
136
  getInputObjectNodeByData(inputObjectDefinitionData: InputObjectDefinitionData): import("../../schema-building/ast").MutableInputObjectNode;
133
137
  getCompositeOutputNodeByData(compositeOutputData: CompositeOutputData): ObjectTypeNode | InterfaceTypeDefinitionNode;
134
138
  getScalarNodeByData(scalarDefinitionData: ScalarDefinitionData): import("../../schema-building/ast").MutableScalarNode;
135
- getSchemaNodeByData(schemaData: SchemaData): SchemaDefinitionNode | SchemaExtensionNode | undefined;
139
+ schemaNodeFromData(schemaData: SchemaData): SchemaNodeResult;
136
140
  getUnionNodeByData(unionDefinitionData: UnionDefinitionData): import("../../schema-building/ast").MutableUnionNode;
137
141
  evaluateExternalKeyFields(): void;
138
142
  addValidConditionalFieldSetConfigurations(): void;
@@ -140,4 +144,3 @@ export declare class NormalizationFactory {
140
144
  validateOneOfDirective({ data, requiredFieldNames }: ValidateOneOfDirectiveParams): boolean;
141
145
  normalize(document: DocumentNode): NormalizationResult;
142
146
  }
143
- export declare function batchNormalize({ options, subgraphs }: BatchNormalizeParams): BatchNormalizationResult;