@@ -534,15 +534,6 @@ function executeFields(
534534 try {
535535 for ( const [ responseName , fieldDetailsList ] of groupedFieldSet ) {
536536 const fieldPath = addPath ( path , responseName , parentType . name ) ;
537- const abortSignal = exeContext . validatedExecutionArgs . abortSignal ;
538- if ( abortSignal ?. aborted ) {
539- throw locatedError (
540- new Error ( abortSignal . reason ) ,
541- toNodes ( fieldDetailsList ) ,
542- pathToArray ( fieldPath ) ,
543- ) ;
544- }
545-
546537 const result = executeField (
547538 exeContext ,
548539 parentType ,
@@ -1274,13 +1265,23 @@ function completeObjectValue(
12741265 path : Path ,
12751266 result : unknown ,
12761267) : PromiseOrValue < ObjMap < unknown > > {
1268+ const validatedExecutionArgs = exeContext . validatedExecutionArgs ;
1269+ const abortSignal = validatedExecutionArgs . abortSignal ;
1270+ if ( abortSignal ?. aborted ) {
1271+ throw locatedError (
1272+ new Error ( abortSignal . reason ) ,
1273+ toNodes ( fieldDetailsList ) ,
1274+ pathToArray ( path ) ,
1275+ ) ;
1276+ }
1277+
12771278 // If there is an isTypeOf predicate function, call it with the
12781279 // current result. If isTypeOf returns false, then raise an error rather
12791280 // than continuing execution.
12801281 if ( returnType . isTypeOf ) {
12811282 const isTypeOf = returnType . isTypeOf (
12821283 result ,
1283- exeContext . validatedExecutionArgs . contextValue ,
1284+ validatedExecutionArgs . contextValue ,
12841285 info ,
12851286 ) ;
12861287
0 commit comments