Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
Co-Authored-By: yaacovCR <[email protected]>
  • Loading branch information
JoviDeCroock and yaacovCR committed Jun 19, 2024
1 parent f6fd3cf commit d8894ea
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/validation/rules/OverlappingFieldsCanBeMergedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,24 +485,27 @@ function findConflictsBetweenSubSelectionSets(

// (E) Then collect any conflicts between the provided collection of fields
// and any fragment names found in the given fragment.
const processDiscoveredFragments = (
function processDiscoveredFragments (
context: ValidationContext,
conflicts: Array<Conflict>,
cachedFieldsAndFragmentNames: Map<SelectionSetNode, FieldsAndFragmentNames>,
comparedFragmentPairs: PairSet,
areMutuallyExclusive: boolean,
fieldMap: NodeAndDefCollection,
discoveredFragments: Array<Array<string>>,
) => {
while (discoveredFragments.length !== 0) {
const item = discoveredFragments.pop();
) {
let item;
while ((item = discoveredFragments.pop()) !== undefined) {
const [fragmentName, referencedFragmentName] = item;
if (
!item ||
comparedFragmentPairs.has(item[1], item[0], areMutuallyExclusive)
comparedFragmentPairs.has(
referencedFragmentName,
fragmentName,
areMutuallyExclusive,
)
) {
continue;
}
const [fragmentName, referencedFragmentName] = item;
comparedFragmentPairs.add(
referencedFragmentName,
fragmentName,
Expand Down

0 comments on commit d8894ea

Please sign in to comment.