Skip to content

Commit a359a93

Browse files
sachindshindeyaacovCR
authored andcommitted
Revert previous changes for collectConflictsBetweenFieldsAndFragment() in light of bug
1 parent 99f868a commit a359a93

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/validation/rules/OverlappingFieldsCanBeMergedRule.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ function findConflictsWithinSelectionSet(
200200
conflicts,
201201
cachedFieldsAndFragmentNames,
202202
comparedFragmentPairs,
203-
null,
204203
false,
205204
fieldMap,
206205
fragmentNames[i],
@@ -232,15 +231,10 @@ function collectConflictsBetweenFieldsAndFragment(
232231
conflicts: Array<Conflict>,
233232
cachedFieldsAndFragmentNames: Map<SelectionSetNode, FieldsAndFragmentNames>,
234233
comparedFragmentPairs: PairSet,
235-
comparedFragmentsForFields: null | Set<string>,
236234
areMutuallyExclusive: boolean,
237235
fieldMap: NodeAndDefCollection,
238236
fragmentName: string,
239237
): void {
240-
if (comparedFragmentsForFields?.has(fragmentName)) {
241-
return;
242-
}
243-
244238
const fragment = context.getFragment(fragmentName);
245239
if (!fragment) {
246240
return;
@@ -272,15 +266,12 @@ function collectConflictsBetweenFieldsAndFragment(
272266

273267
// (E) Then collect any conflicts between the provided collection of fields
274268
// and any fragment names found in the given fragment.
275-
const newComparedFragmentsForFields =
276-
comparedFragmentsForFields ?? new Set([fragmentName]);
277269
for (const referencedFragmentName of referencedFragmentNames) {
278270
collectConflictsBetweenFieldsAndFragment(
279271
context,
280272
conflicts,
281273
cachedFieldsAndFragmentNames,
282274
comparedFragmentPairs,
283-
newComparedFragmentsForFields,
284275
areMutuallyExclusive,
285276
fieldMap,
286277
referencedFragmentName,
@@ -423,7 +414,6 @@ function findConflictsBetweenSubSelectionSets(
423414
conflicts,
424415
cachedFieldsAndFragmentNames,
425416
comparedFragmentPairs,
426-
null,
427417
areMutuallyExclusive,
428418
fieldMap1,
429419
fragmentName2,
@@ -438,7 +428,6 @@ function findConflictsBetweenSubSelectionSets(
438428
conflicts,
439429
cachedFieldsAndFragmentNames,
440430
comparedFragmentPairs,
441-
null,
442431
areMutuallyExclusive,
443432
fieldMap2,
444433
fragmentName1,

0 commit comments

Comments
 (0)