@@ -201,7 +201,7 @@ public static String mkNameForPath(List<Field> currentField) {
201201 @ SuppressWarnings ("unchecked" )
202202 @ DuckTyped (shape = "CompletableFuture<Map<String, Object>> | Map<String, Object>" )
203203 protected Object executeObject (ExecutionContext executionContext , ExecutionStrategyParameters parameters ) throws NonNullableFieldWasNullException {
204- return executionContext .run (() -> {
204+ return executionContext .call (() -> {
205205 DataLoaderDispatchStrategy dataLoaderDispatcherStrategy = executionContext .getDataLoaderDispatcherStrategy ();
206206 dataLoaderDispatcherStrategy .executeObject (executionContext , parameters );
207207 Instrumentation instrumentation = executionContext .getInstrumentation ();
@@ -226,7 +226,7 @@ protected Object executeObject(ExecutionContext executionContext, ExecutionStrat
226226 if (fieldValueInfosResult instanceof CompletableFuture ) {
227227 CompletableFuture <List <FieldValueInfo >> fieldValueInfos = (CompletableFuture <List <FieldValueInfo >>) fieldValueInfosResult ;
228228 fieldValueInfos .whenComplete ((completeValueInfos , throwable ) -> {
229- executionContext .runnable (() -> {
229+ executionContext .run (() -> {
230230 if (throwable != null ) {
231231 handleResultsConsumer .accept (null , throwable );
232232 return ;
@@ -237,7 +237,7 @@ protected Object executeObject(ExecutionContext executionContext, ExecutionStrat
237237 resolveObjectCtx .onFieldValuesInfo (completeValueInfos );
238238 resultFutures .await ().whenComplete (handleResultsConsumer );
239239 });
240- }).exceptionally ((ex ) -> executionContext .run (() -> {
240+ }).exceptionally ((ex ) -> executionContext .call (() -> {
241241 // if there are any issues with combining/handling the field results,
242242 // complete the future at all costs and bubble up any thrown exception so
243243 // the execution does not hang.
@@ -280,7 +280,7 @@ protected Object executeObject(ExecutionContext executionContext, ExecutionStrat
280280
281281 private BiConsumer <List <Object >, Throwable > buildFieldValueMap (List <String > fieldNames , CompletableFuture <Map <String , Object >> overallResult , ExecutionContext executionContext ) {
282282 return (List <Object > results , Throwable exception ) -> {
283- executionContext .runnable (() -> {
283+ executionContext .run (() -> {
284284 if (exception != null ) {
285285 handleValueException (overallResult , exception , executionContext );
286286 return ;
@@ -514,7 +514,7 @@ private Object fetchField(GraphQLFieldDefinition fieldDef, ExecutionContext exec
514514 @ SuppressWarnings ("unchecked" )
515515 CompletableFuture <Object > fetchedValue = (CompletableFuture <Object >) fetchedObject ;
516516 return fetchedValue
517- .handle ((result , exception ) -> executionContext .run (() -> {
517+ .handle ((result , exception ) -> executionContext .call (() -> {
518518 fetchCtx .onCompleted (result , exception );
519519 if (exception != null ) {
520520 CompletableFuture <Object > handleFetchingExceptionResult = handleFetchingException (dataFetchingEnvironment .get (), parameters , exception );
@@ -560,7 +560,7 @@ protected Supplier<ExecutableNormalizedField> getNormalizedField(ExecutionContex
560560 protected FetchedValue unboxPossibleDataFetcherResult (ExecutionContext executionContext ,
561561 ExecutionStrategyParameters parameters ,
562562 Object result ) {
563- return executionContext .run (() -> {
563+ return executionContext .call (() -> {
564564 if (result instanceof DataFetcherResult ) {
565565 DataFetcherResult <?> dataFetcherResult = (DataFetcherResult <?>) result ;
566566
@@ -646,7 +646,7 @@ protected FieldValueInfo completeField(ExecutionContext executionContext, Execut
646646 }
647647
648648 private FieldValueInfo completeField (GraphQLFieldDefinition fieldDef , ExecutionContext executionContext , ExecutionStrategyParameters parameters , FetchedValue fetchedValue ) {
649- return executionContext .run (() -> {
649+ return executionContext .call (() -> {
650650 GraphQLObjectType parentType = (GraphQLObjectType ) parameters .getExecutionStepInfo ().getUnwrappedNonNullType ();
651651 ExecutionStepInfo executionStepInfo = createExecutionStepInfo (executionContext , parameters , fieldDef , parentType );
652652
@@ -843,7 +843,7 @@ protected FieldValueInfo completeValueForList(ExecutionContext executionContext,
843843 overallResult .whenComplete (completeListCtx ::onCompleted );
844844
845845 resultsFuture .whenComplete ((results , exception ) -> {
846- executionContext .runnable (() -> {
846+ executionContext .run (() -> {
847847 if (exception != null ) {
848848 handleValueException (overallResult , exception , executionContext );
849849 return ;
0 commit comments