@@ -798,7 +798,7 @@ function executeField(
798
798
deferMap : ReadonlyMap < DeferUsage , DeferredFragmentRecord > | undefined ,
799
799
) : PromiseOrValue < GraphQLWrappedResult < unknown > > | undefined {
800
800
const validatedExecutionArgs = exeContext . validatedExecutionArgs ;
801
- const { schema, contextValue, variableValues, hideSuggestions } =
801
+ const { schema, contextValue, variableValues, hideSuggestions, abortSignal } =
802
802
validatedExecutionArgs ;
803
803
const fieldName = fieldDetailsList [ 0 ] . node . name . value ;
804
804
const fieldDef = schema . getField ( parentType , fieldName ) ;
@@ -833,7 +833,7 @@ function executeField(
833
833
// The resolve function's optional third argument is a context value that
834
834
// is provided to every resolve function within an execution. It is commonly
835
835
// 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 ) ;
837
837
838
838
if ( isPromise ( result ) ) {
839
839
return completePromisedValue (
@@ -1955,12 +1955,12 @@ export const defaultTypeResolver: GraphQLTypeResolver<unknown, unknown> =
1955
1955
* of calling that function while passing along args and context value.
1956
1956
*/
1957
1957
export const defaultFieldResolver : GraphQLFieldResolver < unknown , unknown > =
1958
- function ( source : any , args , contextValue , info ) {
1958
+ function ( source : any , args , contextValue , info , abortSignal ) {
1959
1959
// ensure source is a value for which property access is acceptable.
1960
1960
if ( isObjectLike ( source ) || typeof source === 'function' ) {
1961
1961
const property = source [ info . fieldName ] ;
1962
1962
if ( typeof property === 'function' ) {
1963
- return source [ info . fieldName ] ( args , contextValue , info ) ;
1963
+ return source [ info . fieldName ] ( args , contextValue , info , abortSignal ) ;
1964
1964
}
1965
1965
return property ;
1966
1966
}
@@ -2115,6 +2115,7 @@ function executeSubscription(
2115
2115
operation,
2116
2116
variableValues,
2117
2117
hideSuggestions,
2118
+ abortSignal,
2118
2119
} = validatedExecutionArgs ;
2119
2120
2120
2121
const rootType = schema . getSubscriptionType ( ) ;
@@ -2180,7 +2181,7 @@ function executeSubscription(
2180
2181
// The resolve function's optional third argument is a context value that
2181
2182
// is provided to every resolve function within an execution. It is commonly
2182
2183
// 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 ) ;
2184
2185
2185
2186
if ( isPromise ( result ) ) {
2186
2187
return result
0 commit comments