@@ -798,7 +798,7 @@ function executeField(
798798 deferMap : ReadonlyMap < DeferUsage , DeferredFragmentRecord > | undefined ,
799799) : PromiseOrValue < GraphQLWrappedResult < unknown > > | undefined {
800800 const validatedExecutionArgs = exeContext . validatedExecutionArgs ;
801- const { schema, contextValue, variableValues, hideSuggestions } =
801+ const { schema, contextValue, variableValues, hideSuggestions, abortSignal } =
802802 validatedExecutionArgs ;
803803 const fieldName = fieldDetailsList [ 0 ] . node . name . value ;
804804 const fieldDef = schema . getField ( parentType , fieldName ) ;
@@ -833,7 +833,7 @@ function executeField(
833833 // The resolve function's optional third argument is a context value that
834834 // is provided to every resolve function within an execution. It is commonly
835835 // used to represent an authenticated user, or request-specific caches.
836- const result = resolveFn ( source , args , contextValue , info ) ;
836+ const result = resolveFn ( source , args , contextValue , info , abortSignal ) ;
837837
838838 if ( isPromise ( result ) ) {
839839 return completePromisedValue (
@@ -1955,12 +1955,12 @@ export const defaultTypeResolver: GraphQLTypeResolver<unknown, unknown> =
19551955 * of calling that function while passing along args and context value.
19561956 */
19571957export const defaultFieldResolver : GraphQLFieldResolver < unknown , unknown > =
1958- function ( source : any , args , contextValue , info ) {
1958+ function ( source : any , args , contextValue , info , abortSignal ) {
19591959 // ensure source is a value for which property access is acceptable.
19601960 if ( isObjectLike ( source ) || typeof source === 'function' ) {
19611961 const property = source [ info . fieldName ] ;
19621962 if ( typeof property === 'function' ) {
1963- return source [ info . fieldName ] ( args , contextValue , info ) ;
1963+ return source [ info . fieldName ] ( args , contextValue , info , abortSignal ) ;
19641964 }
19651965 return property ;
19661966 }
@@ -2115,6 +2115,7 @@ function executeSubscription(
21152115 operation,
21162116 variableValues,
21172117 hideSuggestions,
2118+ abortSignal,
21182119 } = validatedExecutionArgs ;
21192120
21202121 const rootType = schema . getSubscriptionType ( ) ;
@@ -2180,7 +2181,7 @@ function executeSubscription(
21802181 // The resolve function's optional third argument is a context value that
21812182 // is provided to every resolve function within an execution. It is commonly
21822183 // used to represent an authenticated user, or request-specific caches.
2183- const result = resolveFn ( rootValue , args , contextValue , info ) ;
2184+ const result = resolveFn ( rootValue , args , contextValue , info , abortSignal ) ;
21842185
21852186 if ( isPromise ( result ) ) {
21862187 return result
0 commit comments