Skip to content

Commit

Permalink
delay procesing discovered fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 19, 2024
1 parent d4c5449 commit f6fd3cf
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/validation/rules/OverlappingFieldsCanBeMergedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,6 @@ function findConflictsWithinSelectionSet(
discoveredFragments,
);

processDiscoveredFragments(
context,
conflicts,
cachedFieldsAndFragmentNames,
comparedFragmentPairs,
false,
fieldMap,
discoveredFragments,
);
// (C) Then compare this fragment with all other fragments found in this
// selection set to collect conflicts between fragments spread together.
// This compares each item in the list of fragment names to every other
Expand All @@ -232,6 +223,16 @@ function findConflictsWithinSelectionSet(
);
}
}

processDiscoveredFragments(
context,
conflicts,
cachedFieldsAndFragmentNames,
comparedFragmentPairs,
false,
fieldMap,
discoveredFragments,
);
}
return conflicts;
}
Expand Down

0 comments on commit f6fd3cf

Please sign in to comment.