Skip to content

fix(validation): catch OverlappingFieldsCanBeMergedRule violations with nested fragments #4168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Revert non-test changes in #3442 , which introduced the bugged compar…
…eFragmentPairs usage
  • Loading branch information
sachindshinde authored and yaacovCR committed Sep 23, 2024
commit 997923d32cfb0069eeafd356f4503d000d122802
16 changes: 0 additions & 16 deletions src/validation/rules/OverlappingFieldsCanBeMergedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,22 +267,6 @@ function collectConflictsBetweenFieldsAndFragment(
// (E) Then collect any conflicts between the provided collection of fields
// and any fragment names found in the given fragment.
for (const referencedFragmentName of referencedFragmentNames) {
// Memoize so two fragments are not compared for conflicts more than once.
if (
comparedFragmentPairs.has(
referencedFragmentName,
fragmentName,
areMutuallyExclusive,
)
) {
continue;
}
comparedFragmentPairs.add(
referencedFragmentName,
fragmentName,
areMutuallyExclusive,
);

collectConflictsBetweenFieldsAndFragment(
context,
conflicts,
Expand Down