Skip to content

Commit 86d38c1

Browse files
authored
Reuse ExecutionStrategyInstrumentationContext.NOOP in DataLoaderDispatcherInstrumentation (#3068)
1 parent 3be28fc commit 86d38c1

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

src/main/java/graphql/execution/instrumentation/dataloader/DataLoaderDispatcherInstrumentation.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,7 @@ private boolean isDataLoaderCompatibleExecution(ExecutionContext executionContex
129129
// if there are no data loaders, there is nothing to do
130130
//
131131
if (state.hasNoDataLoaders()) {
132-
return new ExecutionStrategyInstrumentationContext() {
133-
@Override
134-
public void onDispatched(CompletableFuture<ExecutionResult> result) {
135-
}
136-
137-
@Override
138-
public void onCompleted(ExecutionResult result, Throwable t) {
139-
}
140-
};
141-
132+
return ExecutionStrategyInstrumentationContext.NOOP;
142133
}
143134
return state.getApproach().beginExecutionStrategy(parameters, state.getState());
144135
}

0 commit comments

Comments
 (0)