use of graphql.execution.ExecutionStrategy in project graphql-java by graphql-java.
the class DataLoaderDispatcherInstrumentation method beginExecuteOperation.
@Override
public InstrumentationContext<ExecutionResult> beginExecuteOperation(InstrumentationExecuteOperationParameters parameters) {
ExecutionStrategy queryStrategy = parameters.getExecutionContext().getQueryStrategy();
if (!(queryStrategy instanceof AsyncExecutionStrategy)) {
CallStack callStack = parameters.getInstrumentationState();
callStack.setAggressivelyBatching(false);
}
return whenDispatched((result) -> dispatch());
}
use of graphql.execution.ExecutionStrategy in project graphql-java by graphql-java.
the class ExecutionExamples method exceptionHandler.
private void exceptionHandler() {
DataFetcherExceptionHandler handler = new DataFetcherExceptionHandler() {
@Override
public void accept(DataFetcherExceptionHandlerParameters handlerParameters) {
//
// do your custom handling here. The parameters have all you need
}
};
ExecutionStrategy executionStrategy = new AsyncExecutionStrategy(handler);
}
Aggregations