@@ -19,7 +19,6 @@ import { locatedError } from '../error/locatedError.js';
1919
2020import type {
2121 DocumentNode ,
22- FieldNode ,
2322 FragmentDefinitionNode ,
2423 OperationDefinitionNode ,
2524} from '../language/ast.js' ;
@@ -48,6 +47,7 @@ import { GraphQLStreamDirective } from '../type/directives.js';
4847import type { GraphQLSchema } from '../type/schema.js' ;
4948import { assertValidSchema } from '../type/validate.js' ;
5049
50+ import type { FieldGroup } from './collectFields.js' ;
5151import {
5252 collectFields ,
5353 collectSubfields as _collectSubfields ,
@@ -72,7 +72,7 @@ const collectSubfields = memoize3(
7272 (
7373 exeContext : ExecutionContext ,
7474 returnType : GraphQLObjectType ,
75- fieldNodes : ReadonlyArray < FieldNode > ,
75+ fieldNodes : FieldGroup ,
7676 ) =>
7777 _collectSubfields (
7878 exeContext . schema ,
@@ -589,7 +589,7 @@ function executeFieldsSerially(
589589 parentType : GraphQLObjectType ,
590590 sourceValue : unknown ,
591591 path : Path | undefined ,
592- fields : Map < string , ReadonlyArray < FieldNode > > ,
592+ fields : Map < string , FieldGroup > ,
593593) : PromiseOrValue < ObjMap < unknown > > {
594594 return promiseReduce (
595595 fields ,
@@ -627,7 +627,7 @@ function executeFields(
627627 parentType : GraphQLObjectType ,
628628 sourceValue : unknown ,
629629 path : Path | undefined ,
630- fields : Map < string , ReadonlyArray < FieldNode > > ,
630+ fields : Map < string , FieldGroup > ,
631631 asyncPayloadRecord ?: AsyncPayloadRecord ,
632632) : PromiseOrValue < ObjMap < unknown > > {
633633 const results = Object . create ( null ) ;
@@ -683,7 +683,7 @@ function executeField(
683683 exeContext : ExecutionContext ,
684684 parentType : GraphQLObjectType ,
685685 source : unknown ,
686- fieldNodes : ReadonlyArray < FieldNode > ,
686+ fieldNodes : FieldGroup ,
687687 path : Path ,
688688 asyncPayloadRecord ?: AsyncPayloadRecord ,
689689) : PromiseOrValue < unknown > {
@@ -771,7 +771,7 @@ function executeField(
771771export function buildResolveInfo (
772772 exeContext : ExecutionContext ,
773773 fieldDef : GraphQLField < unknown , unknown > ,
774- fieldNodes : ReadonlyArray < FieldNode > ,
774+ fieldNodes : FieldGroup ,
775775 parentType : GraphQLObjectType ,
776776 path : Path ,
777777) : GraphQLResolveInfo {
@@ -832,7 +832,7 @@ function handleFieldError(
832832function completeValue (
833833 exeContext : ExecutionContext ,
834834 returnType : GraphQLOutputType ,
835- fieldNodes : ReadonlyArray < FieldNode > ,
835+ fieldNodes : FieldGroup ,
836836 info : GraphQLResolveInfo ,
837837 path : Path ,
838838 result : unknown ,
@@ -924,7 +924,7 @@ function completeValue(
924924async function completePromisedValue (
925925 exeContext : ExecutionContext ,
926926 returnType : GraphQLOutputType ,
927- fieldNodes : ReadonlyArray < FieldNode > ,
927+ fieldNodes : FieldGroup ,
928928 info : GraphQLResolveInfo ,
929929 path : Path ,
930930 result : Promise < unknown > ,
@@ -961,7 +961,7 @@ async function completePromisedValue(
961961 */
962962function getStreamValues (
963963 exeContext : ExecutionContext ,
964- fieldNodes : ReadonlyArray < FieldNode > ,
964+ fieldNodes : FieldGroup ,
965965 path : Path ,
966966) :
967967 | undefined
@@ -1018,7 +1018,7 @@ function getStreamValues(
10181018async function completeAsyncIteratorValue (
10191019 exeContext : ExecutionContext ,
10201020 itemType : GraphQLOutputType ,
1021- fieldNodes : ReadonlyArray < FieldNode > ,
1021+ fieldNodes : FieldGroup ,
10221022 info : GraphQLResolveInfo ,
10231023 path : Path ,
10241024 iterator : AsyncIterator < unknown > ,
@@ -1092,7 +1092,7 @@ async function completeAsyncIteratorValue(
10921092function completeListValue (
10931093 exeContext : ExecutionContext ,
10941094 returnType : GraphQLList < GraphQLOutputType > ,
1095- fieldNodes : ReadonlyArray < FieldNode > ,
1095+ fieldNodes : FieldGroup ,
10961096 info : GraphQLResolveInfo ,
10971097 path : Path ,
10981098 result : unknown ,
@@ -1187,7 +1187,7 @@ function completeListItemValue(
11871187 errors : Array < GraphQLError > ,
11881188 exeContext : ExecutionContext ,
11891189 itemType : GraphQLOutputType ,
1190- fieldNodes : ReadonlyArray < FieldNode > ,
1190+ fieldNodes : FieldGroup ,
11911191 info : GraphQLResolveInfo ,
11921192 itemPath : Path ,
11931193 asyncPayloadRecord ?: AsyncPayloadRecord ,
@@ -1274,7 +1274,7 @@ function completeLeafValue(
12741274function completeAbstractValue (
12751275 exeContext : ExecutionContext ,
12761276 returnType : GraphQLAbstractType ,
1277- fieldNodes : ReadonlyArray < FieldNode > ,
1277+ fieldNodes : FieldGroup ,
12781278 info : GraphQLResolveInfo ,
12791279 path : Path ,
12801280 result : unknown ,
@@ -1327,7 +1327,7 @@ function ensureValidRuntimeType(
13271327 runtimeTypeName : unknown ,
13281328 exeContext : ExecutionContext ,
13291329 returnType : GraphQLAbstractType ,
1330- fieldNodes : ReadonlyArray < FieldNode > ,
1330+ fieldNodes : FieldGroup ,
13311331 info : GraphQLResolveInfo ,
13321332 result : unknown ,
13331333) : GraphQLObjectType {
@@ -1384,7 +1384,7 @@ function ensureValidRuntimeType(
13841384function completeObjectValue (
13851385 exeContext : ExecutionContext ,
13861386 returnType : GraphQLObjectType ,
1387- fieldNodes : ReadonlyArray < FieldNode > ,
1387+ fieldNodes : FieldGroup ,
13881388 info : GraphQLResolveInfo ,
13891389 path : Path ,
13901390 result : unknown ,
@@ -1430,7 +1430,7 @@ function completeObjectValue(
14301430function invalidReturnTypeError (
14311431 returnType : GraphQLObjectType ,
14321432 result : unknown ,
1433- fieldNodes : ReadonlyArray < FieldNode > ,
1433+ fieldNodes : FieldGroup ,
14341434) : GraphQLError {
14351435 return new GraphQLError (
14361436 `Expected value of type "${ returnType . name } " but got: ${ inspect ( result ) } .` ,
@@ -1441,7 +1441,7 @@ function invalidReturnTypeError(
14411441function collectAndExecuteSubfields (
14421442 exeContext : ExecutionContext ,
14431443 returnType : GraphQLObjectType ,
1444- fieldNodes : ReadonlyArray < FieldNode > ,
1444+ fieldNodes : FieldGroup ,
14451445 path : Path ,
14461446 result : unknown ,
14471447 asyncPayloadRecord ?: AsyncPayloadRecord ,
@@ -1770,7 +1770,7 @@ function executeDeferredFragment(
17701770 exeContext : ExecutionContext ,
17711771 parentType : GraphQLObjectType ,
17721772 sourceValue : unknown ,
1773- fields : Map < string , ReadonlyArray < FieldNode > > ,
1773+ fields : Map < string , FieldGroup > ,
17741774 label ?: string ,
17751775 path ?: Path ,
17761776 parentContext ?: AsyncPayloadRecord ,
@@ -1810,7 +1810,7 @@ function executeStreamField(
18101810 itemPath : Path ,
18111811 item : PromiseOrValue < unknown > ,
18121812 exeContext : ExecutionContext ,
1813- fieldNodes : ReadonlyArray < FieldNode > ,
1813+ fieldNodes : FieldGroup ,
18141814 info : GraphQLResolveInfo ,
18151815 itemType : GraphQLOutputType ,
18161816 label ?: string ,
@@ -1904,7 +1904,7 @@ function executeStreamField(
19041904async function executeStreamIteratorItem (
19051905 iterator : AsyncIterator < unknown > ,
19061906 exeContext : ExecutionContext ,
1907- fieldNodes : ReadonlyArray < FieldNode > ,
1907+ fieldNodes : FieldGroup ,
19081908 info : GraphQLResolveInfo ,
19091909 itemType : GraphQLOutputType ,
19101910 asyncPayloadRecord : StreamRecord ,
@@ -1961,7 +1961,7 @@ async function executeStreamIterator(
19611961 initialIndex : number ,
19621962 iterator : AsyncIterator < unknown > ,
19631963 exeContext : ExecutionContext ,
1964- fieldNodes : ReadonlyArray < FieldNode > ,
1964+ fieldNodes : FieldGroup ,
19651965 info : GraphQLResolveInfo ,
19661966 itemType : GraphQLOutputType ,
19671967 path : Path ,
0 commit comments