@wundergraph/composition 0.62.2 → 0.63.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.
@@ -10,5 +10,6 @@ export interface ExecutionSingleFailure extends ExecutionFailure {
10
10
  export interface ExecutionSuccess {
11
11
  success: true;
12
12
  }
13
+ export type ExecutionResult = ExecutionFailure | ExecutionSuccess;
13
14
  export type ExecutionMultiResult = ExecutionMultiFailure | ExecutionSuccess;
14
15
  export type ExecutionSingleFailureResult = ExecutionSingleFailure | ExecutionSuccess;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.COMPOSITION_VERSION = void 0;
4
- exports.COMPOSITION_VERSION = '0.62.2';
4
+ exports.COMPOSITION_VERSION = '0.63.1';
5
5
  //# sourceMappingURL=composition-version.js.map
@@ -183,3 +183,4 @@ export declare const INPUT_NODE_KINDS: Set<Kind>;
183
183
  export declare const OUTPUT_NODE_KINDS: Set<Kind>;
184
184
  export declare const INTERFACE_NODE_KINDS: Set<Kind>;
185
185
  export declare const NON_REPEATABLE_FEDERATED_DIRECTIVES: Set<string>;
186
+ export declare const VALID_PROVIDES_PARENT_KINDS: Set<Kind>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EXTERNAL = exports.EXECUTION = exports.ENUM_VALUE_UPPER = exports.ENUM_VALUE = exports.ENUM_UPPER = exports.ENUM = exports.ENTITY_UNION = exports.OPENFED_ENTITY_CACHE = exports.ENTITIES_FIELD = exports.ENTITIES = exports.EDFS_REDIS_SUBSCRIBE = exports.EDFS_REDIS_PUBLISH = exports.EDFS_NATS_STREAM_CONFIGURATION = exports.EDFS_PUBLISH_RESULT = exports.EDFS_NATS_SUBSCRIBE = exports.EDFS_NATS_REQUEST = exports.EDFS_NATS_PUBLISH = exports.EDFS_KAFKA_SUBSCRIBE = exports.EDFS_KAFKA_PUBLISH = exports.DIRECTIVE_DEFINITION = exports.DESCRIPTION_OVERRIDE = exports.DEPRECATED_DEFAULT_ARGUMENT_VALUE = exports.DEPRECATED = exports.DEFAULT_SUBSCRIPTION = exports.DEFAULT_QUERY = exports.DEFAULT_MUTATION = exports.DEFAULT_EDFS_PROVIDER_ID = exports.DEFAULT = exports.COST = exports.CONTEXT = exports.CONNECT_FIELD_RESOLVER = exports.CONSUMER_NAME = exports.CONSUMER_INACTIVE_THRESHOLD = exports.CONFIGURE_CHILD_DESCRIPTIONS = exports.CONFIGURE_DESCRIPTION = exports.CONDITION = exports.COMPOSE_DIRECTIVE = exports.CHANNELS = exports.CHANNEL = exports.OPENFED_CACHE_POPULATE = exports.OPENFED_CACHE_INVALIDATE = exports.BOOLEAN_SCALAR = exports.BOOLEAN = exports.ARGUMENT_DEFINITION_UPPER = exports.AUTHENTICATED = exports.ARGUMENT = exports.ANY_SCALAR = exports.AND_UPPER = exports.ASSUMED_SIZE = exports.AS = void 0;
4
4
  exports.PROVIDER_TYPE_KAFKA = exports.PROPAGATE = exports.MUTATION_UPPER = exports.MUTATION = exports.NUMBER = exports.MAX_AGE = exports.LITERAL_PERIOD = exports.LITERAL_NEW_LINE = exports.LITERAL_SPACE = exports.LITERAL_AT = exports.LIST = exports.LINK_PURPOSE = exports.LINK_IMPORT = exports.LIST_SIZE = exports.LINK = exports.LEVELS = exports.LEFT_PARENTHESIS = exports.KEY = exports.INTERFACE_OBJECT = exports.INTERFACE_UPPER = exports.INTERFACE = exports.INT_SCALAR = exports.INPUT_VALUE = exports.INPUT_OBJECT_UPPER = exports.INPUT_OBJECT = exports.INPUT_FIELD_DEFINITION_UPPER = exports.INPUT_FIELD = exports.INPUT = exports.INLINE_FRAGMENT_UPPER = exports.INLINE_FRAGMENT = exports.INACCESSIBLE = exports.IN_UPPER = exports.INCLUDE_HEADERS = exports.IMPORT = exports.ID_SCALAR = exports.HYPHEN_JOIN = exports.FROM = exports.FRAGMENT_SPREAD_UPPER = exports.FRAGMENT_DEFINITION_UPPER = exports.FOR = exports.FLOAT_SCALAR = exports.FIRST_ORDINAL = exports.FIELD_DEFINITION_UPPER = exports.FIELDS = exports.FIELD_SET_SCALAR = exports.FIELD_UPPER = exports.FIELD_PATH = exports.FIELD = exports.EXTENSIONS = exports.EXTENDS = void 0;
5
5
  exports.SPECIFIED_BY = exports.SLICING_ARGUMENTS = exports.SIZED_FIELDS = exports.SHAREABLE = exports.SHADOW_MODE = exports.SERVICE_FIELD = exports.SERVICE_OBJECT = exports.SEMANTIC_NON_NULL = exports.SELECTION_REPRESENTATION = exports.SECURITY = exports.SCOPE_SCALAR = exports.SCOPES = exports.SCHEMA_UPPER = exports.SCHEMA = exports.SCALAR_UPPER = exports.SCALAR = exports.RESOLVABLE = exports.REQUIRES_SCOPES = exports.REQUIRES = exports.REQUIRE_ONE_SLICING_ARGUMENT = exports.REQUIRE_FETCH_REASONS = exports.REQUEST = exports.REASON = exports.QUOTATION_JOIN = exports.QUERY_UPPER = exports.QUERY = exports.PUBLISH = exports.PROVIDES = exports.PROVIDER_ID = exports.PARENT_EXTENSION_DATA_MAP = exports.PARENT_DEFINITION_DATA_MAP = exports.PARENT_DEFINITION_DATA = exports.PARTIAL_CACHE_LOAD = exports.OVERRIDE = exports.OR_UPPER = exports.OBJECT_UPPER = exports.OBJECT = exports.OPERATION_TO_DEFAULT = exports.ONE_OF = exports.NULL = exports.NOT_UPPER = exports.NON_NULLABLE_STRING = exports.NON_NULLABLE_INT = exports.NON_NULLABLE_BOOLEAN = exports.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT = exports.NEGATIVE_CACHE_TTL = exports.NAME = exports.NOT_APPLICABLE = exports.PROVIDER_TYPE_REDIS = exports.PROVIDER_TYPE_NATS = void 0;
6
- exports.NON_REPEATABLE_FEDERATED_DIRECTIVES = exports.INTERFACE_NODE_KINDS = exports.OUTPUT_NODE_KINDS = exports.INPUT_NODE_KINDS = exports.IGNORED_FIELDS = exports.INHERITABLE_DIRECTIVE_NAMES = exports.PERSISTED_CLIENT_DIRECTIVES = exports.AUTHORIZATION_DIRECTIVES = exports.ROOT_TYPE_NAMES = exports.EXECUTABLE_DIRECTIVE_LOCATIONS = exports.WEIGHT = exports.VARIABLE_DEFINITION_UPPER = exports.VALUES = exports.URL_LOWER = exports.UNION_UPPER = exports.UNION = exports.TYPENAME = exports.TOPICS = exports.TOPIC = exports.TAG = exports.SUCCESS = exports.SUBSCRIPTION_UPPER = exports.SUBSCRIBE = exports.SUBSCRIPTION_FILTER_VALUE = exports.SUBSCRIPTION_FILTER_CONDITION = exports.SUBSCRIPTION_FILTER = exports.SUBSCRIPTION_FIELD_CONDITION = exports.SUBSCRIPTION = exports.SUBJECTS = exports.SUBJECT = exports.STRING_SCALAR = exports.STRING = exports.STREAM_NAME = exports.STREAM_CONFIGURATION = void 0;
6
+ exports.VALID_PROVIDES_PARENT_KINDS = exports.NON_REPEATABLE_FEDERATED_DIRECTIVES = exports.INTERFACE_NODE_KINDS = exports.OUTPUT_NODE_KINDS = exports.INPUT_NODE_KINDS = exports.IGNORED_FIELDS = exports.INHERITABLE_DIRECTIVE_NAMES = exports.PERSISTED_CLIENT_DIRECTIVES = exports.AUTHORIZATION_DIRECTIVES = exports.ROOT_TYPE_NAMES = exports.EXECUTABLE_DIRECTIVE_LOCATIONS = exports.WEIGHT = exports.VARIABLE_DEFINITION_UPPER = exports.VALUES = exports.URL_LOWER = exports.UNION_UPPER = exports.UNION = exports.TYPENAME = exports.TOPICS = exports.TOPIC = exports.TAG = exports.SUCCESS = exports.SUBSCRIPTION_UPPER = exports.SUBSCRIBE = exports.SUBSCRIPTION_FILTER_VALUE = exports.SUBSCRIPTION_FILTER_CONDITION = exports.SUBSCRIPTION_FILTER = exports.SUBSCRIPTION_FIELD_CONDITION = exports.SUBSCRIPTION = exports.SUBJECTS = exports.SUBJECT = exports.STRING_SCALAR = exports.STRING = exports.STREAM_NAME = exports.STREAM_CONFIGURATION = void 0;
7
7
  const graphql_1 = require("graphql");
8
8
  exports.AS = 'as';
9
9
  exports.ASSUMED_SIZE = 'assumedSize';
@@ -207,4 +207,9 @@ exports.OUTPUT_NODE_KINDS = new Set([
207
207
  ]);
208
208
  exports.INTERFACE_NODE_KINDS = new Set([graphql_1.Kind.INTERFACE_TYPE_DEFINITION, graphql_1.Kind.INTERFACE_TYPE_EXTENSION]);
209
209
  exports.NON_REPEATABLE_FEDERATED_DIRECTIVES = new Set([exports.INACCESSIBLE, exports.ONE_OF, exports.SEMANTIC_NON_NULL]);
210
+ exports.VALID_PROVIDES_PARENT_KINDS = new Set([
211
+ graphql_1.Kind.INTERFACE_TYPE_DEFINITION,
212
+ graphql_1.Kind.OBJECT_TYPE_DEFINITION,
213
+ graphql_1.Kind.UNION_TYPE_DEFINITION,
214
+ ]);
210
215
  //# sourceMappingURL=string-constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"string-constants.js","sourceRoot":"","sources":["../../src/utils/string-constants.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA+B;AAGlB,QAAA,EAAE,GAAG,IAAI,CAAC;AACV,QAAA,YAAY,GAAG,aAAa,CAAC;AAC7B,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAG,UAAU,CAAC;AACtB,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,yBAAyB,GAAG,qBAAqB,CAAC;AAClD,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,cAAc,GAAG,SAAS,CAAC;AAC3B,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAClD,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,QAAQ,GAAG,UAAU,CAAC;AACtB,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AACvC,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,qBAAqB,GAAG,+BAA+B,CAAC;AACxD,QAAA,4BA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AI,CAAC,oBAAoB;IACzB,cAAI,CAAC,yBAAyB;IAC9B,cAAI,CAAC,sBAAsB;IAC3B,cAAI,CAAC,sBAAsB;IAC3B,cAAI,CAAC,qBAAqB;CAC3B,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAAO,CAAC,cAAI,CAAC,yBAAyB,EAAE,cAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;AAEtG,QAAA,mCAAmC,GAAG,IAAI,GAAG,CAAgB,CAAC,oBAAY,EAAE,cAAM,EAAE,yBAAiB,CAAC,CAAC,CAAC;AAExG,QAAA,2BAA2B,GAAG,IAAI,GAAG,CAAO;IACvD,cAAI,CAAC,yBAAyB;IAC9B,cAAI,CAAC,sBAAsB;IAC3B,cAAI,CAAC,qBAAqB;CAC3B,CAAC,CAAC"}
@@ -7,11 +7,11 @@ import { type InvalidRootTypeFieldEventsDirectiveData } from '../../errors/types
7
7
  import { Graph } from '../../resolvability-graph/graph';
8
8
  import { type Warning } from '../../warnings/types';
9
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 HandleOverrideDirectiveParams, type HandleRequiresScopesDirectiveParams, type HandleSemanticNonNullDirectiveParams, type KeyFieldSetData, type LinkImportData, type RecordDirectiveWeightOnFieldParams, type UpsertInputObjectResult, type ValidateDirectiveParams } from './types/types';
10
+ import { type AddInputValueDataByNodeParams, type ComposeDirectiveNode, type ConditionalFieldSetValidationResult, type ExtractDirectiveArgumentDataResult, type FieldSetData, type HandleCostDirectiveParams, type HandleListSizeDirectiveParams, type HandleOverrideDirectiveParams, type HandleRequiresScopesDirectiveParams, type HandleSemanticNonNullDirectiveParams, type KeyFieldSetData, type LinkImportData, type RecordDirectiveWeightOnFieldParams, type UpsertInputObjectResult, type ValidateDirectiveParams } from './types/types';
11
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';
12
+ import { type GetFieldSetParentParams, type HandleFieldInheritableDirectivesParams, type IsAnyImplementationFieldExternalParams, 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';
14
+ import { type FieldSetParentResult, type SchemaNodeResult } from './types/results';
15
15
  import { type AddDirectiveArgumentDataByNodeParams, type ExtractDirectiveArgumentDataParams } from '../../directive-definition-data/types/params';
16
16
  import { type DirectiveArgumentData, type DirectiveDefinitionData } from '../../directive-definition-data/types/types';
17
17
  export declare function normalizeSubgraphFromString({ noLocation, options, sdlString, }: NormalizeSubgraphFromStringParams): NormalizationResult;
@@ -101,8 +101,9 @@ export declare class NormalizationFactory {
101
101
  extractUnionMembers(node: UnionTypeNode, membersByMemberTypeName: Map<string, NamedTypeNode>): Map<string, NamedTypeNode>;
102
102
  upsertUnionByNode(node: UnionTypeNode, isRealExtension?: boolean): void;
103
103
  extractKeyFieldSets(node: CompositeOutputNode, keyFieldSetDataByFieldSet: Map<string, KeyFieldSetData>): void;
104
- getFieldSetParent(isProvides: boolean, parentData: CompositeOutputData, fieldName: string, parentTypeName: string): FieldSetParentResult;
105
- validateConditionalFieldSet(selectionSetParentData: CompositeOutputData, fieldSet: string, directiveFieldName: string, isProvides: boolean, directiveParentTypeName: string): ConditionalFieldSetValidationResult;
104
+ getFieldSetParent({ isProvides, parentData, fieldName, fieldSet, parentTypeName, }: GetFieldSetParentParams): FieldSetParentResult;
105
+ handleConditionalImplementationField({ fieldCoordsPath, fieldName, fieldPath, interfaceTypeName, isProvides, }: IsAnyImplementationFieldExternalParams): boolean;
106
+ validateConditionalFieldSet(selectionSetParentData: CompositeOutputData | UnionDefinitionData, fieldSet: string, directiveFieldName: string, isProvides: boolean, directiveParentTypeName: string): ConditionalFieldSetValidationResult;
106
107
  validateProvidesOrRequires(parentData: CompositeOutputData, fieldSetByFieldName: Map<string, string>, isProvides: boolean): RequiredFieldConfiguration[] | undefined;
107
108
  validateInterfaceImplementations(data: CompositeOutputData): void;
108
109
  handleAuthenticatedDirective(data: NodeData | SchemaData, parentTypeName: string): void;
@@ -1153,42 +1153,70 @@ class NormalizationFactory {
1153
1153
  }
1154
1154
  }
1155
1155
  }
1156
- getFieldSetParent(isProvides, parentData, fieldName, parentTypeName) {
1156
+ getFieldSetParent({ isProvides, parentData, fieldName, fieldSet, parentTypeName, }) {
1157
1157
  if (!isProvides) {
1158
- return { fieldSetParentData: parentData };
1158
+ return {
1159
+ data: parentData,
1160
+ success: true,
1161
+ };
1159
1162
  }
1160
1163
  const fieldData = (0, utils_5.getOrThrowError)(parentData.fieldDataByName, fieldName, `${parentTypeName}.fieldDataByFieldName`);
1161
1164
  const fieldNamedTypeName = (0, ast_1.getTypeNodeNamedTypeName)(fieldData.node.type);
1162
1165
  const fieldCoords = `${parentTypeName}.${fieldName}`;
1163
1166
  if (constants_1.BASE_SCALARS.has(fieldNamedTypeName)) {
1164
1167
  return {
1165
- errorString: (0, errors_1.incompatibleTypeWithProvidesErrorMessage)({
1168
+ error: (0, errors_1.incompatibleTypeWithProvidesError)({
1166
1169
  fieldCoords,
1167
1170
  responseType: fieldNamedTypeName,
1168
1171
  subgraphName: this.subgraphName,
1169
1172
  }),
1173
+ success: false,
1170
1174
  };
1171
1175
  }
1172
1176
  const namedTypeData = this.parentDefinitionDataByTypeName.get(fieldNamedTypeName);
1173
1177
  // This error should never happen
1174
1178
  if (!namedTypeData) {
1175
1179
  return {
1176
- errorString: (0, errors_1.unknownNamedTypeErrorMessage)(fieldCoords, fieldNamedTypeName),
1180
+ error: (0, errors_1.unknownNamedTypeError)(fieldCoords, fieldNamedTypeName),
1181
+ success: false,
1177
1182
  };
1178
1183
  }
1179
1184
  // @TODO handle abstract types and fragments
1180
- if (namedTypeData.kind !== graphql_1.Kind.INTERFACE_TYPE_DEFINITION && namedTypeData.kind !== graphql_1.Kind.OBJECT_TYPE_DEFINITION) {
1181
- return {
1182
- errorString: (0, errors_1.incompatibleTypeWithProvidesErrorMessage)({
1183
- fieldCoords,
1184
- responseType: fieldNamedTypeName,
1185
+ if ((0, utils_1.isValidProvidesParentData)(namedTypeData)) {
1186
+ if ((0, utils_3.isUnionDefinitionData)(namedTypeData)) {
1187
+ this.warnings.push((0, warnings_1.providesOnUnionWarning)({
1188
+ directiveCoords: fieldCoords,
1189
+ fieldSet,
1190
+ namedTypeName: fieldNamedTypeName,
1185
1191
  subgraphName: this.subgraphName,
1186
- }),
1192
+ }));
1193
+ }
1194
+ return {
1195
+ data: namedTypeData,
1196
+ success: true,
1187
1197
  };
1188
1198
  }
1189
- return { fieldSetParentData: namedTypeData };
1199
+ return {
1200
+ error: (0, errors_1.incompatibleTypeWithProvidesError)({
1201
+ fieldCoords,
1202
+ responseType: fieldNamedTypeName,
1203
+ subgraphName: this.subgraphName,
1204
+ }),
1205
+ success: false,
1206
+ };
1190
1207
  }
1191
- #handleNonExternalConditionalField({ currentFieldCoords, directiveCoords, directiveName, fieldSet, }) {
1208
+ #handleNonExternalConditionalField({ currentFieldCoords, directiveCoords, directiveName, fieldSet, parentData, selection, }) {
1209
+ if ((0, utils_4.isInterfaceDefinitionData)(parentData)) {
1210
+ this.errors.push((0, errors_1.directlyProvidedInterfaceFieldError)({
1211
+ directiveCoords,
1212
+ directiveName,
1213
+ fieldSet,
1214
+ selection,
1215
+ subgraphName: this.subgraphName,
1216
+ targetCoords: currentFieldCoords,
1217
+ }));
1218
+ return;
1219
+ }
1192
1220
  if (this.isSubgraphVersionTwo) {
1193
1221
  this.errors.push((0, errors_1.nonExternalConditionalFieldError)({
1194
1222
  directiveCoords,
@@ -1204,6 +1232,37 @@ class NormalizationFactory {
1204
1232
  * */
1205
1233
  this.warnings.push((0, warnings_1.nonExternalConditionalFieldWarning)(directiveCoords, this.subgraphName, currentFieldCoords, fieldSet, directiveName));
1206
1234
  }
1235
+ // Returns true if at least one implementation field is @external
1236
+ handleConditionalImplementationField({ fieldCoordsPath, fieldName, fieldPath, interfaceTypeName, isProvides, }) {
1237
+ const implementationTypeNames = this.concreteTypeNamesByAbstractTypeName.get(interfaceTypeName);
1238
+ if (!implementationTypeNames) {
1239
+ return false;
1240
+ }
1241
+ let hasExternalField = false;
1242
+ for (const typeName of implementationTypeNames) {
1243
+ const data = this.parentDefinitionDataByTypeName.get(typeName);
1244
+ if (!(0, utils_3.isObjectDefinitionData)(data)) {
1245
+ continue;
1246
+ }
1247
+ const fieldData = data.fieldDataByName.get(fieldName);
1248
+ if (!fieldData?.directivesByName.has(string_constants_1.EXTERNAL)) {
1249
+ continue;
1250
+ }
1251
+ const externalData = fieldData.externalFieldDataBySubgraphName.get(this.subgraphName);
1252
+ if (!externalData || externalData.isUnconditionallyProvided) {
1253
+ continue;
1254
+ }
1255
+ if (!isProvides) {
1256
+ return true;
1257
+ }
1258
+ (0, utils_5.getValueOrDefault)(this.conditionalFieldDataByCoords, `${typeName}.${fieldName}`, utils_4.newConditionalFieldData).providedBy.push((0, utils_6.newFieldSetConditionData)({
1259
+ fieldCoordinatesPath: [...fieldCoordsPath],
1260
+ fieldPath: [...fieldPath],
1261
+ }));
1262
+ hasExternalField = true;
1263
+ }
1264
+ return hasExternalField;
1265
+ }
1207
1266
  validateConditionalFieldSet(selectionSetParentData, fieldSet, directiveFieldName, isProvides, directiveParentTypeName) {
1208
1267
  // Create a new selection set so that the value can be parsed as a new DocumentNode
1209
1268
  const { error, documentNode } = (0, utils_1.safeParse)('{' + fieldSet + '}');
@@ -1248,17 +1307,29 @@ class NormalizationFactory {
1248
1307
  fieldCoordsPath.push(currentFieldCoords);
1249
1308
  fieldPath.push(fieldName);
1250
1309
  lastFieldName = fieldName;
1310
+ const isInterfaceParent = (0, utils_4.isInterfaceDefinitionData)(parentData);
1251
1311
  if (fieldName === string_constants_1.TYPENAME) {
1252
1312
  if (isProvides) {
1253
1313
  errorMessages.push((0, errors_1.typeNameAlreadyProvidedErrorMessage)(currentFieldCoords, nf.subgraphName));
1254
1314
  return graphql_1.BREAK;
1255
1315
  }
1256
1316
  if (externalAncestors.size < 1) {
1317
+ if (isProvides && isInterfaceParent) {
1318
+ nf.warnings.push((0, warnings_1.providesWithInterfaceFieldSelectionWarning)({
1319
+ directiveCoords,
1320
+ fieldCoords: currentFieldCoords,
1321
+ fieldSet,
1322
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1323
+ subgraphName: nf.subgraphName,
1324
+ }));
1325
+ }
1257
1326
  nf.#handleNonExternalConditionalField({
1258
1327
  currentFieldCoords,
1259
1328
  directiveCoords,
1260
1329
  directiveName,
1261
1330
  fieldSet,
1331
+ parentData,
1332
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1262
1333
  });
1263
1334
  }
1264
1335
  return;
@@ -1287,14 +1358,43 @@ class NormalizationFactory {
1287
1358
  namedTypeData?.kind === graphql_1.Kind.SCALAR_TYPE_DEFINITION ||
1288
1359
  namedTypeData?.kind === graphql_1.Kind.ENUM_TYPE_DEFINITION) {
1289
1360
  if (externalAncestors.size < 1 && !isDefinedExternal) {
1361
+ if (isProvides && isInterfaceParent) {
1362
+ nf.warnings.push((0, warnings_1.providesWithInterfaceFieldSelectionWarning)({
1363
+ directiveCoords,
1364
+ fieldCoords: currentFieldCoords,
1365
+ fieldSet,
1366
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1367
+ subgraphName: nf.subgraphName,
1368
+ }));
1369
+ }
1290
1370
  nf.#handleNonExternalConditionalField({
1291
1371
  currentFieldCoords,
1292
1372
  directiveCoords,
1293
1373
  directiveName,
1294
1374
  fieldSet,
1375
+ parentData,
1376
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1295
1377
  });
1296
1378
  return;
1297
1379
  }
1380
+ if (isInterfaceParent) {
1381
+ if (isProvides) {
1382
+ nf.warnings.push((0, warnings_1.providesWithInterfaceFieldSelectionWarning)({
1383
+ directiveCoords,
1384
+ fieldCoords: currentFieldCoords,
1385
+ fieldSet,
1386
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1387
+ subgraphName: nf.subgraphName,
1388
+ }));
1389
+ }
1390
+ nf.handleConditionalImplementationField({
1391
+ fieldCoordsPath,
1392
+ fieldName,
1393
+ fieldPath,
1394
+ interfaceTypeName: parentData.name,
1395
+ isProvides,
1396
+ });
1397
+ }
1298
1398
  if (externalAncestors.size < 1 && isUnconditionallyProvided) {
1299
1399
  // V2 subgraphs return an error when an external key field on an entity extension is provided.
1300
1400
  if (nf.isSubgraphVersionTwo) {
@@ -1335,13 +1435,35 @@ class NormalizationFactory {
1335
1435
  }
1336
1436
  externalAncestors.add(currentFieldCoords);
1337
1437
  }
1338
- if (namedTypeData.kind === graphql_1.Kind.OBJECT_TYPE_DEFINITION ||
1339
- namedTypeData.kind === graphql_1.Kind.INTERFACE_TYPE_DEFINITION ||
1340
- namedTypeData.kind === graphql_1.Kind.UNION_TYPE_DEFINITION) {
1341
- shouldDefineSelectionSet = true;
1342
- parentDatas.push(namedTypeData);
1438
+ if (!(0, utils_1.isValidProvidesParentData)(namedTypeData)) {
1343
1439
  return;
1344
1440
  }
1441
+ shouldDefineSelectionSet = true;
1442
+ parentDatas.push(namedTypeData);
1443
+ if (!isInterfaceParent) {
1444
+ return;
1445
+ }
1446
+ if (isProvides) {
1447
+ nf.warnings.push((0, warnings_1.providesWithInterfaceFieldSelectionWarning)({
1448
+ directiveCoords,
1449
+ fieldCoords: currentFieldCoords,
1450
+ fieldSet,
1451
+ selection: fieldPath.length < 2 ? fieldName : `${fieldPath.at(-2)} { ${fieldName} }`,
1452
+ subgraphName: nf.subgraphName,
1453
+ }));
1454
+ }
1455
+ if (!nf.handleConditionalImplementationField({
1456
+ fieldCoordsPath,
1457
+ fieldName,
1458
+ fieldPath,
1459
+ interfaceTypeName: parentData.name,
1460
+ isProvides,
1461
+ }) ||
1462
+ externalAncestors.size > 0) {
1463
+ return;
1464
+ }
1465
+ hasConditionalField = true;
1466
+ externalAncestors.add(currentFieldCoords);
1345
1467
  },
1346
1468
  leave() {
1347
1469
  externalAncestors.delete(fieldCoordsPath.pop() || '');
@@ -1364,10 +1486,6 @@ class NormalizationFactory {
1364
1486
  shouldDefineSelectionSet = true;
1365
1487
  return;
1366
1488
  }
1367
- if (!(0, utils_1.isKindAbstract)(parentData.kind)) {
1368
- errorMessages.push((0, errors_1.invalidInlineFragmentTypeErrorMessage)(fieldSet, fieldCoordsPath, typeConditionName, parentTypeName));
1369
- return graphql_1.BREAK;
1370
- }
1371
1489
  const fragmentNamedTypeData = nf.parentDefinitionDataByTypeName.get(typeConditionName);
1372
1490
  if (!fragmentNamedTypeData) {
1373
1491
  errorMessages.push((0, errors_1.unknownInlineFragmentTypeConditionErrorMessage)(fieldSet, fieldCoordsPath, parentTypeName, typeConditionName));
@@ -1376,13 +1494,31 @@ class NormalizationFactory {
1376
1494
  shouldDefineSelectionSet = true;
1377
1495
  switch (fragmentNamedTypeData.kind) {
1378
1496
  case graphql_1.Kind.INTERFACE_TYPE_DEFINITION: {
1379
- if (!fragmentNamedTypeData.implementedInterfaceTypeNames.has(parentTypeName)) {
1497
+ // The enclosing type is an Object
1498
+ if (!(0, utils_1.isKindAbstract)(parentData.kind)) {
1499
+ if (!(0, utils_3.isObjectDefinitionData)(parentData) ||
1500
+ !parentData.implementedInterfaceTypeNames.has(typeConditionName)) {
1501
+ break;
1502
+ }
1503
+ parentDatas.push(fragmentNamedTypeData);
1504
+ return;
1505
+ }
1506
+ // The enclosing type is an Interface or Union
1507
+ const concreteTypeNames = nf.concreteTypeNamesByAbstractTypeName.get(typeConditionName);
1508
+ const parentConcreteTypeNames = nf.concreteTypeNamesByAbstractTypeName.get(parentData.name);
1509
+ if (!concreteTypeNames ||
1510
+ !parentConcreteTypeNames ||
1511
+ parentConcreteTypeNames.isDisjointFrom(concreteTypeNames)) {
1380
1512
  break;
1381
1513
  }
1382
1514
  parentDatas.push(fragmentNamedTypeData);
1383
1515
  return;
1384
1516
  }
1385
1517
  case graphql_1.Kind.OBJECT_TYPE_DEFINITION: {
1518
+ if (!(0, utils_1.isKindAbstract)(parentData.kind)) {
1519
+ errorMessages.push((0, errors_1.invalidInlineFragmentTypeErrorMessage)(fieldSet, fieldCoordsPath, typeConditionName, parentTypeName));
1520
+ return graphql_1.BREAK;
1521
+ }
1386
1522
  const concreteTypeNames = nf.concreteTypeNamesByAbstractTypeName.get(parentTypeName);
1387
1523
  if (!concreteTypeNames || !concreteTypeNames.has(typeConditionName)) {
1388
1524
  break;
@@ -1391,6 +1527,24 @@ class NormalizationFactory {
1391
1527
  return;
1392
1528
  }
1393
1529
  case graphql_1.Kind.UNION_TYPE_DEFINITION: {
1530
+ const concreteTypeNames = nf.concreteTypeNamesByAbstractTypeName.get(typeConditionName);
1531
+ if (!concreteTypeNames) {
1532
+ break;
1533
+ }
1534
+ // The enclosing type is an Object
1535
+ if (!(0, utils_1.isKindAbstract)(parentData.kind)) {
1536
+ // The enclosing Object is a valid part of the Union
1537
+ if (concreteTypeNames.has(parentTypeName)) {
1538
+ parentDatas.push(fragmentNamedTypeData);
1539
+ return;
1540
+ }
1541
+ break;
1542
+ }
1543
+ // The enclosing type is an Interface or Union; fetch its implementations/members respectively.
1544
+ const parentConcreteTypeNames = nf.concreteTypeNamesByAbstractTypeName.get(parentTypeName);
1545
+ if (!parentConcreteTypeNames || parentConcreteTypeNames.isDisjointFrom(concreteTypeNames)) {
1546
+ break;
1547
+ }
1394
1548
  parentDatas.push(fragmentNamedTypeData);
1395
1549
  return;
1396
1550
  }
@@ -1399,7 +1553,7 @@ class NormalizationFactory {
1399
1553
  return graphql_1.BREAK;
1400
1554
  }
1401
1555
  }
1402
- errorMessages.push((0, errors_1.invalidInlineFragmentTypeConditionErrorMessage)(fieldSet, fieldCoordsPath, typeConditionName, (0, utils_5.kindToNodeType)(parentData.kind), parentTypeName));
1556
+ errorMessages.push((0, errors_1.invalidInlineFragmentTypeConditionErrorMessage)(fieldSet, fieldCoordsPath, typeConditionName, (0, utils_5.kindToNodeType)(parentData.kind), parentTypeName, (0, utils_5.kindToNodeType)(fragmentNamedTypeData.kind)));
1403
1557
  return graphql_1.BREAK;
1404
1558
  },
1405
1559
  },
@@ -1466,16 +1620,19 @@ class NormalizationFactory {
1466
1620
  Consequently, at that time, it is unknown whether the named type is an entity.
1467
1621
  If it isn't, the @provides directive does not make sense and can be ignored.
1468
1622
  */
1469
- const { fieldSetParentData, errorString } = this.getFieldSetParent(isProvides, parentData, fieldName, parentTypeName);
1470
- const fieldCoords = `${parentTypeName}.${fieldName}`;
1471
- if (errorString) {
1472
- allErrorMessages.push(errorString);
1473
- continue;
1474
- }
1475
- if (!fieldSetParentData) {
1623
+ const result = this.getFieldSetParent({
1624
+ fieldName,
1625
+ fieldSet,
1626
+ isProvides,
1627
+ parentData,
1628
+ parentTypeName,
1629
+ });
1630
+ if (!result.success) {
1631
+ allErrorMessages.push(result.error.message);
1476
1632
  continue;
1477
1633
  }
1478
- const { errorMessages, configuration } = this.validateConditionalFieldSet(fieldSetParentData, fieldSet, fieldName, isProvides, parentTypeName);
1634
+ const fieldCoords = `${parentTypeName}.${fieldName}`;
1635
+ const { errorMessages, configuration } = this.validateConditionalFieldSet(result.data, fieldSet, fieldName, isProvides, parentTypeName);
1479
1636
  /*
1480
1637
  * It is possible to return no error messages nor configuration if the @provides or @requires directive is
1481
1638
  * considered completely redundant, i.e.,: