@@ -573,15 +573,6 @@ function executeFields(
573573 try {
574574 for ( const [ responseName , fieldDetailsList ] of groupedFieldSet ) {
575575 const fieldPath = addPath ( path , responseName , parentType . name ) ;
576- const abortSignal = exeContext . validatedExecutionArgs . abortSignal ;
577- if ( abortSignal ?. aborted ) {
578- throw locatedError (
579- new Error ( abortSignal . reason ) ,
580- toNodes ( fieldDetailsList ) ,
581- pathToArray ( fieldPath ) ,
582- ) ;
583- }
584-
585576 const result = executeField (
586577 exeContext ,
587578 parentType ,
@@ -1305,13 +1296,23 @@ function completeObjectValue(
13051296 path : Path ,
13061297 result : unknown ,
13071298) : PromiseOrValue < ObjMap < unknown > > {
1299+ const validatedExecutionArgs = exeContext . validatedExecutionArgs ;
1300+ const abortSignal = validatedExecutionArgs . abortSignal ;
1301+ if ( abortSignal ?. aborted ) {
1302+ throw locatedError (
1303+ new Error ( abortSignal . reason ) ,
1304+ toNodes ( fieldDetailsList ) ,
1305+ pathToArray ( path ) ,
1306+ ) ;
1307+ }
1308+
13081309 // If there is an isTypeOf predicate function, call it with the
13091310 // current result. If isTypeOf returns false, then raise an error rather
13101311 // than continuing execution.
13111312 if ( returnType . isTypeOf ) {
13121313 const isTypeOf = returnType . isTypeOf (
13131314 result ,
1314- exeContext . validatedExecutionArgs . contextValue ,
1315+ validatedExecutionArgs . contextValue ,
13151316 info ,
13161317 ) ;
13171318
0 commit comments