@@ -223,7 +223,7 @@ function findConflictsWithinSelectionSet(
223
223
comparedFragmentPairs ,
224
224
false ,
225
225
fieldMap ,
226
- fragmentName ,
226
+ referencedFragmentName ,
227
227
discoveredFragments ,
228
228
) ;
229
229
}
@@ -439,26 +439,26 @@ function findConflictsBetweenSubSelectionSets(
439
439
) ;
440
440
}
441
441
442
- // (E) Then collect any conflicts between the provided collection of fields
443
- // and any fragment names found in the given fragment.
444
- while ( discoveredFragments . length !== 0 ) {
445
- const item = discoveredFragments . pop ( ) ;
446
- if ( ! item || comparedFragmentPairs . has ( item [ 1 ] , item [ 0 ] , areMutuallyExclusive ) ) {
447
- continue ;
442
+ // (E) Then collect any conflicts between the provided collection of fields
443
+ // and any fragment names found in the given fragment.
444
+ while ( discoveredFragments . length !== 0 ) {
445
+ const item = discoveredFragments . pop ( ) ;
446
+ if ( ! item || comparedFragmentPairs . has ( item [ 1 ] , item [ 0 ] , areMutuallyExclusive ) ) {
447
+ continue ;
448
+ }
449
+ const [ fragmentName , referencedFragmentName ] = item ;
450
+ comparedFragmentPairs . add ( referencedFragmentName , fragmentName , areMutuallyExclusive ) ;
451
+ collectConflictsBetweenFieldsAndFragment (
452
+ context ,
453
+ conflicts ,
454
+ cachedFieldsAndFragmentNames ,
455
+ comparedFragmentPairs ,
456
+ areMutuallyExclusive ,
457
+ fieldMap1 ,
458
+ referencedFragmentName ,
459
+ discoveredFragments ,
460
+ ) ;
448
461
}
449
- const [ fragmentName , referencedFragmentName ] = item ;
450
- comparedFragmentPairs . add ( referencedFragmentName , fragmentName , areMutuallyExclusive ) ;
451
- collectConflictsBetweenFieldsAndFragment (
452
- context ,
453
- conflicts ,
454
- cachedFieldsAndFragmentNames ,
455
- comparedFragmentPairs ,
456
- areMutuallyExclusive ,
457
- fieldMap1 ,
458
- fragmentName ,
459
- discoveredFragments ,
460
- ) ;
461
- }
462
462
463
463
// (I) Then collect conflicts between the second collection of fields and
464
464
// those referenced by each fragment name associated with the first.
@@ -475,26 +475,26 @@ function findConflictsBetweenSubSelectionSets(
475
475
) ;
476
476
}
477
477
478
- // (E) Then collect any conflicts between the provided collection of fields
479
- // and any fragment names found in the given fragment.
480
- while ( discoveredFragments . length !== 0 ) {
481
- const item = discoveredFragments . pop ( ) ;
482
- if ( ! item || comparedFragmentPairs . has ( item [ 1 ] , item [ 0 ] , areMutuallyExclusive ) ) {
483
- continue ;
478
+ // (E) Then collect any conflicts between the provided collection of fields
479
+ // and any fragment names found in the given fragment.
480
+ while ( discoveredFragments . length !== 0 ) {
481
+ const item = discoveredFragments . pop ( ) ;
482
+ if ( ! item || comparedFragmentPairs . has ( item [ 1 ] , item [ 0 ] , areMutuallyExclusive ) ) {
483
+ continue ;
484
+ }
485
+ const [ fragmentName , referencedFragmentName ] = item ;
486
+ comparedFragmentPairs . add ( referencedFragmentName , fragmentName , areMutuallyExclusive ) ;
487
+ collectConflictsBetweenFieldsAndFragment (
488
+ context ,
489
+ conflicts ,
490
+ cachedFieldsAndFragmentNames ,
491
+ comparedFragmentPairs ,
492
+ areMutuallyExclusive ,
493
+ fieldMap2 ,
494
+ referencedFragmentName ,
495
+ discoveredFragments ,
496
+ ) ;
484
497
}
485
- const [ fragmentName , referencedFragmentName ] = item ;
486
- comparedFragmentPairs . add ( referencedFragmentName , fragmentName , areMutuallyExclusive ) ;
487
- collectConflictsBetweenFieldsAndFragment (
488
- context ,
489
- conflicts ,
490
- cachedFieldsAndFragmentNames ,
491
- comparedFragmentPairs ,
492
- areMutuallyExclusive ,
493
- fieldMap2 ,
494
- fragmentName ,
495
- discoveredFragments ,
496
- ) ;
497
- }
498
498
499
499
// (J) Also collect conflicts between any fragment names by the first and
500
500
// fragment names by the second. This compares each item in the first set of
0 commit comments