Skip to content

Commit

Permalink
chore: add back removed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Aenimus committed Feb 20, 2025
1 parent efe3726 commit 6bb97b4
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 77 deletions.
136 changes: 68 additions & 68 deletions composition-go/index.global.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion composition/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ export * from './v1/utils/constants';
export * from './v1/utils/utils';
export * from './v1/utils/string-constants';
export * from './v1/warnings/warnings';
export { newFieldSetConditionData } from './router-configuration/utils';
8 changes: 4 additions & 4 deletions composition/src/v1/federation/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export function validateImplicitFieldSets({
// Depth 0 is the original parent type
// If a field is external, but it's part of a key FieldSet, it will be included in the root configuration
if (currentDepth === 0) {
// @TODO removed for testing
// keyFieldNames.add(fieldName);
// @TODO
keyFieldNames.add(fieldName);
}
const namedTypeName = getTypeNodeNamedTypeName(fieldData.node.type);
// The base scalars are not in the parents map
Expand Down Expand Up @@ -216,8 +216,8 @@ export function validateImplicitFieldSets({
continue;
}
// Add any top-level fields that compose the key in case they are external
// @TODO removed for testing
// addIterableValuesToSet(keyFieldNames, configurationData.fieldNames);
// @TODO
addIterableValuesToSet(keyFieldNames, configurationData.fieldNames);
implicitKeys.push({
fieldName: '',
selectionSet: fieldSet,
Expand Down
8 changes: 4 additions & 4 deletions composition/src/v1/normalization/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,16 @@ export function validateKeyFieldSets(
* If a field is external, but it's part of a key FieldSet, it should be included in its respective
* root or child node */
if (currentDepth === 0) {
// @TODO removed to test
// fieldNames.add(fieldName);
// @TODO
fieldNames.add(fieldName);
} else {
const nestedConfigurationData = nf.configurationDataByTypeName.get(parentTypeName);
if (!nestedConfigurationData) {
errorMessages.push(invalidConfigurationDataErrorMessage(parentTypeName, fieldName, rawFieldSet));
return BREAK;
}
// @TODO removed to test
// nestedConfigurationData.fieldNames.add(fieldName);
// @TODO
nestedConfigurationData.fieldNames.add(fieldName);
}
getValueOrDefault(nf.keyFieldNamesByParentTypeName, parentTypeName, () => new Set<string>()).add(fieldName);
const namedTypeName = getTypeNodeNamedTypeName(fieldData.node.type);
Expand Down

0 comments on commit 6bb97b4

Please # to comment.