@@ -191,13 +191,11 @@ function findConflictsWithinSelectionSet(
191
191
if ( fragmentNames . length !== 0 ) {
192
192
// (B) Then collect conflicts between these fields and those represented by
193
193
// each spread fragment name found.
194
- const comparedFragments = Object . create ( null ) ;
195
194
for ( let i = 0 ; i < fragmentNames . length ; i ++ ) {
196
195
collectConflictsBetweenFieldsAndFragment (
197
196
context ,
198
197
conflicts ,
199
198
cachedFieldsAndFragmentNames ,
200
- comparedFragments ,
201
199
comparedFragmentPairs ,
202
200
false ,
203
201
fieldMap ,
@@ -229,18 +227,11 @@ function collectConflictsBetweenFieldsAndFragment(
229
227
context : ValidationContext ,
230
228
conflicts : Array < Conflict > ,
231
229
cachedFieldsAndFragmentNames ,
232
- comparedFragments : ObjMap < boolean > ,
233
230
comparedFragmentPairs : PairSet ,
234
231
areMutuallyExclusive : boolean ,
235
232
fieldMap : NodeAndDefCollection ,
236
233
fragmentName : string ,
237
234
) : void {
238
- // Memoize so a fragment is not compared for conflicts more than once.
239
- if ( comparedFragments [ fragmentName ] ) {
240
- return ;
241
- }
242
- comparedFragments [ fragmentName ] = true ;
243
-
244
235
const fragment = context . getFragment ( fragmentName ) ;
245
236
if ( ! fragment ) {
246
237
return ;
@@ -276,7 +267,6 @@ function collectConflictsBetweenFieldsAndFragment(
276
267
context ,
277
268
conflicts ,
278
269
cachedFieldsAndFragmentNames ,
279
- comparedFragments ,
280
270
comparedFragmentPairs ,
281
271
areMutuallyExclusive ,
282
272
fieldMap ,
@@ -413,13 +403,11 @@ function findConflictsBetweenSubSelectionSets(
413
403
// (I) Then collect conflicts between the first collection of fields and
414
404
// those referenced by each fragment name associated with the second.
415
405
if ( fragmentNames2 . length !== 0 ) {
416
- const comparedFragments = Object . create ( null ) ;
417
406
for ( let j = 0 ; j < fragmentNames2 . length ; j ++ ) {
418
407
collectConflictsBetweenFieldsAndFragment (
419
408
context ,
420
409
conflicts ,
421
410
cachedFieldsAndFragmentNames ,
422
- comparedFragments ,
423
411
comparedFragmentPairs ,
424
412
areMutuallyExclusive ,
425
413
fieldMap1 ,
@@ -431,13 +419,11 @@ function findConflictsBetweenSubSelectionSets(
431
419
// (I) Then collect conflicts between the second collection of fields and
432
420
// those referenced by each fragment name associated with the first.
433
421
if ( fragmentNames1 . length !== 0 ) {
434
- const comparedFragments = Object . create ( null ) ;
435
422
for ( let i = 0 ; i < fragmentNames1 . length ; i ++ ) {
436
423
collectConflictsBetweenFieldsAndFragment (
437
424
context ,
438
425
conflicts ,
439
426
cachedFieldsAndFragmentNames ,
440
- comparedFragments ,
441
427
comparedFragmentPairs ,
442
428
areMutuallyExclusive ,
443
429
fieldMap2 ,
0 commit comments