@@ -41,18 +41,18 @@ export function collectFields(
4141 variableValues : { [ variable : string ] : unknown } ,
4242 runtimeType : GraphQLObjectType ,
4343 selectionSet : SelectionSetNode ,
44- ) : Map < string , FieldGroup > {
45- const fields = new AccumulatorMap < string , FieldNode > ( ) ;
44+ ) : GroupedFieldSet {
45+ const groupedFieldSet = new AccumulatorMap < string , FieldNode > ( ) ;
4646 collectFieldsImpl (
4747 schema ,
4848 fragments ,
4949 variableValues ,
5050 runtimeType ,
5151 selectionSet ,
52- fields ,
52+ groupedFieldSet ,
5353 new Set ( ) ,
5454 ) ;
55- return fields ;
55+ return groupedFieldSet ;
5656}
5757
5858/**
@@ -71,8 +71,8 @@ export function collectSubfields(
7171 variableValues : { [ variable : string ] : unknown } ,
7272 returnType : GraphQLObjectType ,
7373 fieldGroup : FieldGroup ,
74- ) : Map < string , FieldGroup > {
75- const subFieldNodes = new AccumulatorMap < string , FieldNode > ( ) ;
74+ ) : GroupedFieldSet {
75+ const subGroupedFieldSet = new AccumulatorMap < string , FieldNode > ( ) ;
7676 const visitedFragmentNames = new Set < string > ( ) ;
7777 for ( const node of fieldGroup ) {
7878 if ( node . selectionSet ) {
@@ -82,12 +82,12 @@ export function collectSubfields(
8282 variableValues ,
8383 returnType ,
8484 node . selectionSet ,
85- subFieldNodes ,
85+ subGroupedFieldSet ,
8686 visitedFragmentNames ,
8787 ) ;
8888 }
8989 }
90- return subFieldNodes ;
90+ return subGroupedFieldSet ;
9191}
9292
9393// eslint-disable-next-line max-params
@@ -97,7 +97,7 @@ function collectFieldsImpl(
9797 variableValues : { [ variable : string ] : unknown } ,
9898 runtimeType : GraphQLObjectType ,
9999 selectionSet : SelectionSetNode ,
100- fields : AccumulatorMap < string , FieldNode > ,
100+ groupedFieldSet : AccumulatorMap < string , FieldNode > ,
101101 visitedFragmentNames : Set < string > ,
102102) : void {
103103 for ( const selection of selectionSet . selections ) {
@@ -106,7 +106,7 @@ function collectFieldsImpl(
106106 if ( ! shouldIncludeNode ( variableValues , selection ) ) {
107107 continue ;
108108 }
109- fields . add ( getFieldEntryKey ( selection ) , selection ) ;
109+ groupedFieldSet . add ( getFieldEntryKey ( selection ) , selection ) ;
110110 break ;
111111 }
112112 case Kind . INLINE_FRAGMENT : {
@@ -122,7 +122,7 @@ function collectFieldsImpl(
122122 variableValues ,
123123 runtimeType ,
124124 selection . selectionSet ,
125- fields ,
125+ groupedFieldSet ,
126126 visitedFragmentNames ,
127127 ) ;
128128 break ;
@@ -149,7 +149,7 @@ function collectFieldsImpl(
149149 variableValues ,
150150 runtimeType ,
151151 fragment . selectionSet ,
152- fields ,
152+ groupedFieldSet ,
153153 visitedFragmentNames ,
154154 ) ;
155155 break ;
0 commit comments