File tree Expand file tree Collapse file tree 2 files changed +110
-104
lines changed Expand file tree Collapse file tree 2 files changed +110
-104
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,16 @@ import { typeFromAST } from '../utilities/typeFromAST.js';
26
26
27
27
import { getDirectiveValues } from './values.js' ;
28
28
29
+ export type FieldSet = ReadonlyArray < FieldNode > ;
30
+
31
+ export type GroupedFieldSet = Map < string , FieldSet > ;
32
+
29
33
export interface PatchFields {
30
- fields : Map < string , ReadonlyArray < FieldNode > > ;
34
+ fields : GroupedFieldSet ;
31
35
}
32
36
33
37
export interface FieldsAndPatches {
34
- fields : Map < string , ReadonlyArray < FieldNode > > ;
38
+ fields : GroupedFieldSet ;
35
39
patches : Array < PatchFields > ;
36
40
}
37
41
@@ -84,7 +88,7 @@ export function collectSubfields(
84
88
variableValues : { [ variable : string ] : unknown } ,
85
89
operation : OperationDefinitionNode ,
86
90
returnType : GraphQLObjectType ,
87
- fieldNodes : ReadonlyArray < FieldNode > ,
91
+ fieldNodes : FieldSet ,
88
92
) : FieldsAndPatches {
89
93
const subFieldNodes = new AccumulatorMap < string , FieldNode > ( ) ;
90
94
const visitedFragmentNames = new Set < string > ( ) ;
You can’t perform that action at this time.
0 commit comments