Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function filterBaseSubschema(
}
}
const allTypes = [typeName, ...iFacesForType];
const isIsolatedFieldName = allTypes.every((implementingTypeName) =>
const isIsolatedFieldName = allTypes.some((implementingTypeName) =>
isIsolatedField(implementingTypeName, fieldName, isolatedSchemaTypes),
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This logic change from every to some is crucial for correctly identifying isolated fields across type hierarchies. As noted in the PR description, this change is not currently covered by tests. Please add tests to verify this new behavior and prevent future regressions, especially for cases involving nested fragments and interfaces.

const isKeyFieldName = allTypes.some((implementingTypeName) =>
Expand Down Expand Up @@ -357,7 +357,7 @@ function filterBaseSubschema(
...iFacesForType,
...typesForInterface[typeName],
];
const isIsolatedFieldName = allTypes.every((implementingTypeName) =>
const isIsolatedFieldName = allTypes.some((implementingTypeName) =>
isIsolatedField(implementingTypeName, fieldName, isolatedSchemaTypes),
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the objectFieldFilter, this logic change from every to some is crucial. It's important to add tests that validate this new filtering logic for interface fields to ensure correctness and prevent regressions.

const isKeyFieldName = allTypes.some((implementingTypeName) =>
Expand Down
Loading