@@ -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' ;
@@ -47,6 +46,7 @@ import {
4746import type { GraphQLSchema } from '../type/schema.js' ;
4847import { assertValidSchema } from '../type/validate.js' ;
4948
49+ import type { FieldGroup } from './collectFields.js' ;
5050import {
5151 collectFields ,
5252 collectSubfields as _collectSubfields ,
@@ -67,7 +67,7 @@ const collectSubfields = memoize3(
6767 (
6868 exeContext : ExecutionContext ,
6969 returnType : GraphQLObjectType ,
70- fieldNodes : ReadonlyArray < FieldNode > ,
70+ fieldNodes : FieldGroup ,
7171 ) =>
7272 _collectSubfields (
7373 exeContext . schema ,
@@ -433,7 +433,7 @@ function executeFieldsSerially(
433433 parentType : GraphQLObjectType ,
434434 sourceValue : unknown ,
435435 path : Path | undefined ,
436- fields : Map < string , ReadonlyArray < FieldNode > > ,
436+ fields : Map < string , FieldGroup > ,
437437) : PromiseOrValue < ObjMap < unknown > > {
438438 return promiseReduce (
439439 fields ,
@@ -471,7 +471,7 @@ function executeFields(
471471 parentType : GraphQLObjectType ,
472472 sourceValue : unknown ,
473473 path : Path | undefined ,
474- fields : Map < string , ReadonlyArray < FieldNode > > ,
474+ fields : Map < string , FieldGroup > ,
475475) : PromiseOrValue < ObjMap < unknown > > {
476476 const results = Object . create ( null ) ;
477477 let containsPromise = false ;
@@ -525,7 +525,7 @@ function executeField(
525525 exeContext : ExecutionContext ,
526526 parentType : GraphQLObjectType ,
527527 source : unknown ,
528- fieldNodes : ReadonlyArray < FieldNode > ,
528+ fieldNodes : FieldGroup ,
529529 path : Path ,
530530) : PromiseOrValue < unknown > {
531531 const fieldName = fieldNodes [ 0 ] . name . value ;
@@ -605,7 +605,7 @@ function executeField(
605605export function buildResolveInfo (
606606 exeContext : ExecutionContext ,
607607 fieldDef : GraphQLField < unknown , unknown > ,
608- fieldNodes : ReadonlyArray < FieldNode > ,
608+ fieldNodes : FieldGroup ,
609609 parentType : GraphQLObjectType ,
610610 path : Path ,
611611) : GraphQLResolveInfo {
@@ -667,7 +667,7 @@ function handleFieldError(
667667function completeValue (
668668 exeContext : ExecutionContext ,
669669 returnType : GraphQLOutputType ,
670- fieldNodes : ReadonlyArray < FieldNode > ,
670+ fieldNodes : FieldGroup ,
671671 info : GraphQLResolveInfo ,
672672 path : Path ,
673673 result : unknown ,
@@ -753,7 +753,7 @@ function completeValue(
753753async function completePromisedValue (
754754 exeContext : ExecutionContext ,
755755 returnType : GraphQLOutputType ,
756- fieldNodes : ReadonlyArray < FieldNode > ,
756+ fieldNodes : FieldGroup ,
757757 info : GraphQLResolveInfo ,
758758 path : Path ,
759759 result : Promise < unknown > ,
@@ -785,7 +785,7 @@ async function completePromisedValue(
785785async function completeAsyncIteratorValue (
786786 exeContext : ExecutionContext ,
787787 itemType : GraphQLOutputType ,
788- fieldNodes : ReadonlyArray < FieldNode > ,
788+ fieldNodes : FieldGroup ,
789789 info : GraphQLResolveInfo ,
790790 path : Path ,
791791 iterator : AsyncIterator < unknown > ,
@@ -835,7 +835,7 @@ async function completeAsyncIteratorValue(
835835function completeListValue (
836836 exeContext : ExecutionContext ,
837837 returnType : GraphQLList < GraphQLOutputType > ,
838- fieldNodes : ReadonlyArray < FieldNode > ,
838+ fieldNodes : FieldGroup ,
839839 info : GraphQLResolveInfo ,
840840 path : Path ,
841841 result : unknown ,
@@ -901,7 +901,7 @@ function completeListItemValue(
901901 completedResults : Array < unknown > ,
902902 exeContext : ExecutionContext ,
903903 itemType : GraphQLOutputType ,
904- fieldNodes : ReadonlyArray < FieldNode > ,
904+ fieldNodes : FieldGroup ,
905905 info : GraphQLResolveInfo ,
906906 itemPath : Path ,
907907) : boolean {
@@ -987,7 +987,7 @@ function completeLeafValue(
987987function completeAbstractValue (
988988 exeContext : ExecutionContext ,
989989 returnType : GraphQLAbstractType ,
990- fieldNodes : ReadonlyArray < FieldNode > ,
990+ fieldNodes : FieldGroup ,
991991 info : GraphQLResolveInfo ,
992992 path : Path ,
993993 result : unknown ,
@@ -1037,7 +1037,7 @@ function ensureValidRuntimeType(
10371037 runtimeTypeName : unknown ,
10381038 exeContext : ExecutionContext ,
10391039 returnType : GraphQLAbstractType ,
1040- fieldNodes : ReadonlyArray < FieldNode > ,
1040+ fieldNodes : FieldGroup ,
10411041 info : GraphQLResolveInfo ,
10421042 result : unknown ,
10431043) : GraphQLObjectType {
@@ -1094,7 +1094,7 @@ function ensureValidRuntimeType(
10941094function completeObjectValue (
10951095 exeContext : ExecutionContext ,
10961096 returnType : GraphQLObjectType ,
1097- fieldNodes : ReadonlyArray < FieldNode > ,
1097+ fieldNodes : FieldGroup ,
10981098 info : GraphQLResolveInfo ,
10991099 path : Path ,
11001100 result : unknown ,
@@ -1137,7 +1137,7 @@ function completeObjectValue(
11371137function invalidReturnTypeError (
11381138 returnType : GraphQLObjectType ,
11391139 result : unknown ,
1140- fieldNodes : ReadonlyArray < FieldNode > ,
1140+ fieldNodes : FieldGroup ,
11411141) : GraphQLError {
11421142 return new GraphQLError (
11431143 `Expected value of type "${ returnType . name } " but got: ${ inspect ( result ) } .` ,
@@ -1148,7 +1148,7 @@ function invalidReturnTypeError(
11481148function collectAndExecuteSubfields (
11491149 exeContext : ExecutionContext ,
11501150 returnType : GraphQLObjectType ,
1151- fieldNodes : ReadonlyArray < FieldNode > ,
1151+ fieldNodes : FieldGroup ,
11521152 path : Path ,
11531153 result : unknown ,
11541154) : PromiseOrValue < ObjMap < unknown > > {
0 commit comments