File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,6 +313,10 @@ function collectConflictsBetweenFieldsAndFragment(
313313 varMap : VariableMap | undefined ,
314314 fragmentSpread : FragmentSpread ,
315315) : void {
316+ if ( fieldMap . size === 0 ) {
317+ return ;
318+ }
319+
316320 const { comparedFieldsAndFragmentPairs } = ruleContext ;
317321 // Memoize so the fields and fragments are not compared for conflicts more
318322 // than once.
@@ -634,6 +638,9 @@ function collectConflictsBetween(
634638 fieldMap2 : NodeAndDefCollection ,
635639 varMap2 : VariableMap | undefined ,
636640) : void {
641+ if ( fieldMap1 . size === 0 || fieldMap2 . size === 0 ) {
642+ return ;
643+ }
637644 // A field map is a keyed collection, where each key represents a response
638645 // name and the value at that key is a list of all fields which provide that
639646 // response name. For any response name which appears in both provided field
You can’t perform that action at this time.
0 commit comments