You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: composition-js/src/merging/merge.ts
+12-2
Original file line number
Diff line number
Diff line change
@@ -1166,6 +1166,7 @@ class Merger {
1166
1166
this.hints.push(newCompositionHint(
1167
1167
HINTS.FROM_SUBGRAPH_DOES_NOT_EXIST,
1168
1168
`Source subgraph "${sourceSubgraphName}" for field "${dest.coordinate}" on subgraph "${subgraphName}" does not exist.${extraMsg}`,
1169
+
dest,
1169
1170
overridingSubgraphASTNode,
1170
1171
));
1171
1172
}elseif(sourceSubgraphName===subgraphName){
@@ -1182,6 +1183,7 @@ class Merger {
1182
1183
this.hints.push(newCompositionHint(
1183
1184
HINTS.OVERRIDE_DIRECTIVE_CAN_BE_REMOVED,
1184
1185
`Field "${dest.coordinate}" on subgraph "${subgraphName}" no longer exists in the from subgraph. The @override directive can be removed.`,
1186
+
dest,
1185
1187
overridingSubgraphASTNode,
1186
1188
));
1187
1189
}else{
@@ -1224,20 +1226,23 @@ class Merger {
1224
1226
this.hints.push(newCompositionHint(
1225
1227
HINTS.OVERRIDE_DIRECTIVE_CAN_BE_REMOVED,
1226
1228
`Field "${dest.coordinate}" on subgraph "${subgraphName}" is not resolved anymore by the from subgraph (it is marked "@external" in "${sourceSubgraphName}"). The @override directive can be removed.`,
`Field "${dest.coordinate}" on subgraph "${sourceSubgraphName}" is overridden. It is still used in some federation directive(s) (@key, @requires, and/or @provides) and/or to satisfy interface constraint(s), but consider marking it @external explicitly or removing it along with its references.`,
1237
+
dest,
1234
1238
overriddenSubgraphASTNode,
1235
1239
));
1236
1240
}else{
1237
1241
result.setUnusedOverridden(fromIdx);
1238
1242
this.hints.push(newCompositionHint(
1239
1243
HINTS.OVERRIDDEN_FIELD_CAN_BE_REMOVED,
1240
1244
`Field "${dest.coordinate}" on subgraph "${sourceSubgraphName}" is overridden. Consider removing it.`,
1245
+
dest,
1241
1246
overriddenSubgraphASTNode,
1242
1247
));
1243
1248
}
@@ -1969,6 +1974,7 @@ class Merger {
1969
1974
this.hints.push(newCompositionHint(
1970
1975
HINTS.UNUSED_ENUM_TYPE,
1971
1976
`Enum type "${dest}" is defined but unused. It will be included in the supergraph with all the values appearing in any subgraph ("as if" it was only used as an output type).`,
1977
+
dest
1972
1978
));
1973
1979
}
1974
1980
@@ -2046,6 +2052,7 @@ class Merger {
2046
2052
message: `Value "${value}" of enum type "${dest}" will not be part of the supergraph as it is not defined in all the subgraphs defining "${dest}": `,
// As soon as we find a subgraph that has the type but not the member, we hint.
2090
2098
if(source&&!source.value(valueName)){
@@ -2093,6 +2101,7 @@ class Merger {
2093
2101
message: `Value "${valueName}" of enum type "${dest}" has been added to the supergraph but is only defined in a subset of the subgraphs defining "${dest}": `,
`Directive @${name} is applied to "${(destasany)['coordinate']??dest}" in multiple subgraphs with different arguments. Merging strategies used by arguments: ${info.argumentsMerger}`,
0 commit comments