@@ -22,7 +22,6 @@ import {
2222}  from  '../type/directives.js' ; 
2323import  type  {  GraphQLSchema  }  from  '../type/schema.js' ; 
2424
25- import  {  keyForFragmentSpread  }  from  '../utilities/keyForFragmentSpread.js' ; 
2625import  {  substituteFragmentArguments  }  from  '../utilities/substituteFragmentArguments.js' ; 
2726import  {  typeFromAST  }  from  '../utilities/typeFromAST.js' ; 
2827
@@ -44,7 +43,7 @@ interface CollectFieldsContext {
4443  variableValues : {  [ variable : string ] : unknown  } ; 
4544  operation : OperationDefinitionNode ; 
4645  runtimeType : GraphQLObjectType ; 
47-   visitedFragmentKeys : Set < string > ; 
46+   visitedFragmentNames : Set < string > ; 
4847} 
4948
5049/** 
@@ -70,7 +69,7 @@ export function collectFields(
7069    variableValues, 
7170    runtimeType, 
7271    operation, 
73-     visitedFragmentKeys : new  Set ( ) , 
72+     visitedFragmentNames : new  Set ( ) , 
7473  } ; 
7574
7675  collectFieldsImpl ( context ,  operation . selectionSet ,  groupedFieldSet ) ; 
@@ -102,7 +101,7 @@ export function collectSubfields(
102101    variableValues, 
103102    runtimeType : returnType , 
104103    operation, 
105-     visitedFragmentKeys : new  Set ( ) , 
104+     visitedFragmentNames : new  Set ( ) , 
106105  } ; 
107106  const  subGroupedFieldSet  =  new  AccumulatorMap < string ,  FieldDetails > ( ) ; 
108107
@@ -134,7 +133,7 @@ function collectFieldsImpl(
134133    variableValues, 
135134    runtimeType, 
136135    operation, 
137-     visitedFragmentKeys , 
136+     visitedFragmentNames , 
138137  }  =  context ; 
139138
140139  for  ( const  selection  of  selectionSet . selections )  { 
@@ -175,7 +174,7 @@ function collectFieldsImpl(
175174        break ; 
176175      } 
177176      case  Kind . FRAGMENT_SPREAD : { 
178-         const  fragmentKey  =  keyForFragmentSpread ( selection ) ; 
177+         const  fragmentName  =  selection . name . value ; 
179178
180179        const  newDeferUsage  =  getDeferUsage ( 
181180          operation , 
@@ -186,13 +185,13 @@ function collectFieldsImpl(
186185
187186        if  ( 
188187          ! newDeferUsage  && 
189-           ( visitedFragmentKeys . has ( fragmentKey )  || 
188+           ( visitedFragmentNames . has ( fragmentName )  || 
190189            ! shouldIncludeNode ( variableValues ,  selection ) ) 
191190        )  { 
192191          continue ; 
193192        } 
194193
195-         const  fragment  =  fragments [ selection . name . value ] ; 
194+         const  fragment  =  fragments [ fragmentName ] ; 
196195        if  ( 
197196          fragment  ==  null  || 
198197          ! doesFragmentConditionMatch ( schema ,  fragment ,  runtimeType ) 
@@ -201,7 +200,7 @@ function collectFieldsImpl(
201200        } 
202201
203202        if  ( ! newDeferUsage )  { 
204-           visitedFragmentKeys . add ( fragmentKey ) ; 
203+           visitedFragmentNames . add ( fragmentName ) ; 
205204        } 
206205
207206        const  fragmentSelectionSet  =  substituteFragmentArguments ( 
0 commit comments