@@ -19,7 +19,6 @@ import { locatedError } from '../error/locatedError.js';
19
19
20
20
import type {
21
21
DocumentNode ,
22
- FieldNode ,
23
22
FragmentDefinitionNode ,
24
23
OperationDefinitionNode ,
25
24
} from '../language/ast.js' ;
@@ -48,6 +47,7 @@ import { GraphQLStreamDirective } from '../type/directives.js';
48
47
import type { GraphQLSchema } from '../type/schema.js' ;
49
48
import { assertValidSchema } from '../type/validate.js' ;
50
49
50
+ import type { FieldGroup } from './collectFields.js' ;
51
51
import {
52
52
collectFields ,
53
53
collectSubfields as _collectSubfields ,
@@ -72,7 +72,7 @@ const collectSubfields = memoize3(
72
72
(
73
73
exeContext : ExecutionContext ,
74
74
returnType : GraphQLObjectType ,
75
- fieldNodes : ReadonlyArray < FieldNode > ,
75
+ fieldNodes : FieldGroup ,
76
76
) =>
77
77
_collectSubfields (
78
78
exeContext . schema ,
@@ -589,7 +589,7 @@ function executeFieldsSerially(
589
589
parentType : GraphQLObjectType ,
590
590
sourceValue : unknown ,
591
591
path : Path | undefined ,
592
- fields : Map < string , ReadonlyArray < FieldNode > > ,
592
+ fields : Map < string , FieldGroup > ,
593
593
) : PromiseOrValue < ObjMap < unknown > > {
594
594
return promiseReduce (
595
595
fields ,
@@ -627,7 +627,7 @@ function executeFields(
627
627
parentType : GraphQLObjectType ,
628
628
sourceValue : unknown ,
629
629
path : Path | undefined ,
630
- fields : Map < string , ReadonlyArray < FieldNode > > ,
630
+ fields : Map < string , FieldGroup > ,
631
631
asyncPayloadRecord ?: AsyncPayloadRecord ,
632
632
) : PromiseOrValue < ObjMap < unknown > > {
633
633
const results = Object . create ( null ) ;
@@ -683,7 +683,7 @@ function executeField(
683
683
exeContext : ExecutionContext ,
684
684
parentType : GraphQLObjectType ,
685
685
source : unknown ,
686
- fieldNodes : ReadonlyArray < FieldNode > ,
686
+ fieldNodes : FieldGroup ,
687
687
path : Path ,
688
688
asyncPayloadRecord ?: AsyncPayloadRecord ,
689
689
) : PromiseOrValue < unknown > {
@@ -771,7 +771,7 @@ function executeField(
771
771
export function buildResolveInfo (
772
772
exeContext : ExecutionContext ,
773
773
fieldDef : GraphQLField < unknown , unknown > ,
774
- fieldNodes : ReadonlyArray < FieldNode > ,
774
+ fieldNodes : FieldGroup ,
775
775
parentType : GraphQLObjectType ,
776
776
path : Path ,
777
777
) : GraphQLResolveInfo {
@@ -832,7 +832,7 @@ function handleFieldError(
832
832
function completeValue (
833
833
exeContext : ExecutionContext ,
834
834
returnType : GraphQLOutputType ,
835
- fieldNodes : ReadonlyArray < FieldNode > ,
835
+ fieldNodes : FieldGroup ,
836
836
info : GraphQLResolveInfo ,
837
837
path : Path ,
838
838
result : unknown ,
@@ -924,7 +924,7 @@ function completeValue(
924
924
async function completePromisedValue (
925
925
exeContext : ExecutionContext ,
926
926
returnType : GraphQLOutputType ,
927
- fieldNodes : ReadonlyArray < FieldNode > ,
927
+ fieldNodes : FieldGroup ,
928
928
info : GraphQLResolveInfo ,
929
929
path : Path ,
930
930
result : Promise < unknown > ,
@@ -961,7 +961,7 @@ async function completePromisedValue(
961
961
*/
962
962
function getStreamValues (
963
963
exeContext : ExecutionContext ,
964
- fieldNodes : ReadonlyArray < FieldNode > ,
964
+ fieldNodes : FieldGroup ,
965
965
path : Path ,
966
966
) :
967
967
| undefined
@@ -1018,7 +1018,7 @@ function getStreamValues(
1018
1018
async function completeAsyncIteratorValue (
1019
1019
exeContext : ExecutionContext ,
1020
1020
itemType : GraphQLOutputType ,
1021
- fieldNodes : ReadonlyArray < FieldNode > ,
1021
+ fieldNodes : FieldGroup ,
1022
1022
info : GraphQLResolveInfo ,
1023
1023
path : Path ,
1024
1024
iterator : AsyncIterator < unknown > ,
@@ -1092,7 +1092,7 @@ async function completeAsyncIteratorValue(
1092
1092
function completeListValue (
1093
1093
exeContext : ExecutionContext ,
1094
1094
returnType : GraphQLList < GraphQLOutputType > ,
1095
- fieldNodes : ReadonlyArray < FieldNode > ,
1095
+ fieldNodes : FieldGroup ,
1096
1096
info : GraphQLResolveInfo ,
1097
1097
path : Path ,
1098
1098
result : unknown ,
@@ -1187,7 +1187,7 @@ function completeListItemValue(
1187
1187
errors : Array < GraphQLError > ,
1188
1188
exeContext : ExecutionContext ,
1189
1189
itemType : GraphQLOutputType ,
1190
- fieldNodes : ReadonlyArray < FieldNode > ,
1190
+ fieldNodes : FieldGroup ,
1191
1191
info : GraphQLResolveInfo ,
1192
1192
itemPath : Path ,
1193
1193
asyncPayloadRecord ?: AsyncPayloadRecord ,
@@ -1274,7 +1274,7 @@ function completeLeafValue(
1274
1274
function completeAbstractValue (
1275
1275
exeContext : ExecutionContext ,
1276
1276
returnType : GraphQLAbstractType ,
1277
- fieldNodes : ReadonlyArray < FieldNode > ,
1277
+ fieldNodes : FieldGroup ,
1278
1278
info : GraphQLResolveInfo ,
1279
1279
path : Path ,
1280
1280
result : unknown ,
@@ -1327,7 +1327,7 @@ function ensureValidRuntimeType(
1327
1327
runtimeTypeName : unknown ,
1328
1328
exeContext : ExecutionContext ,
1329
1329
returnType : GraphQLAbstractType ,
1330
- fieldNodes : ReadonlyArray < FieldNode > ,
1330
+ fieldNodes : FieldGroup ,
1331
1331
info : GraphQLResolveInfo ,
1332
1332
result : unknown ,
1333
1333
) : GraphQLObjectType {
@@ -1384,7 +1384,7 @@ function ensureValidRuntimeType(
1384
1384
function completeObjectValue (
1385
1385
exeContext : ExecutionContext ,
1386
1386
returnType : GraphQLObjectType ,
1387
- fieldNodes : ReadonlyArray < FieldNode > ,
1387
+ fieldNodes : FieldGroup ,
1388
1388
info : GraphQLResolveInfo ,
1389
1389
path : Path ,
1390
1390
result : unknown ,
@@ -1430,7 +1430,7 @@ function completeObjectValue(
1430
1430
function invalidReturnTypeError (
1431
1431
returnType : GraphQLObjectType ,
1432
1432
result : unknown ,
1433
- fieldNodes : ReadonlyArray < FieldNode > ,
1433
+ fieldNodes : FieldGroup ,
1434
1434
) : GraphQLError {
1435
1435
return new GraphQLError (
1436
1436
`Expected value of type "${ returnType . name } " but got: ${ inspect ( result ) } .` ,
@@ -1441,7 +1441,7 @@ function invalidReturnTypeError(
1441
1441
function collectAndExecuteSubfields (
1442
1442
exeContext : ExecutionContext ,
1443
1443
returnType : GraphQLObjectType ,
1444
- fieldNodes : ReadonlyArray < FieldNode > ,
1444
+ fieldNodes : FieldGroup ,
1445
1445
path : Path ,
1446
1446
result : unknown ,
1447
1447
asyncPayloadRecord ?: AsyncPayloadRecord ,
@@ -1770,7 +1770,7 @@ function executeDeferredFragment(
1770
1770
exeContext : ExecutionContext ,
1771
1771
parentType : GraphQLObjectType ,
1772
1772
sourceValue : unknown ,
1773
- fields : Map < string , ReadonlyArray < FieldNode > > ,
1773
+ fields : Map < string , FieldGroup > ,
1774
1774
label ?: string ,
1775
1775
path ?: Path ,
1776
1776
parentContext ?: AsyncPayloadRecord ,
@@ -1810,7 +1810,7 @@ function executeStreamField(
1810
1810
itemPath : Path ,
1811
1811
item : PromiseOrValue < unknown > ,
1812
1812
exeContext : ExecutionContext ,
1813
- fieldNodes : ReadonlyArray < FieldNode > ,
1813
+ fieldNodes : FieldGroup ,
1814
1814
info : GraphQLResolveInfo ,
1815
1815
itemType : GraphQLOutputType ,
1816
1816
label ?: string ,
@@ -1904,7 +1904,7 @@ function executeStreamField(
1904
1904
async function executeStreamIteratorItem (
1905
1905
iterator : AsyncIterator < unknown > ,
1906
1906
exeContext : ExecutionContext ,
1907
- fieldNodes : ReadonlyArray < FieldNode > ,
1907
+ fieldNodes : FieldGroup ,
1908
1908
info : GraphQLResolveInfo ,
1909
1909
itemType : GraphQLOutputType ,
1910
1910
asyncPayloadRecord : StreamRecord ,
@@ -1961,7 +1961,7 @@ async function executeStreamIterator(
1961
1961
initialIndex : number ,
1962
1962
iterator : AsyncIterator < unknown > ,
1963
1963
exeContext : ExecutionContext ,
1964
- fieldNodes : ReadonlyArray < FieldNode > ,
1964
+ fieldNodes : FieldGroup ,
1965
1965
info : GraphQLResolveInfo ,
1966
1966
itemType : GraphQLOutputType ,
1967
1967
path : Path ,
0 commit comments