Search in sources :

Example 1 with DataFetcherExceptionHandlerParameters

use of graphql.execution.DataFetcherExceptionHandlerParameters 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);
}
Also used : DataFetcherExceptionHandler(graphql.execution.DataFetcherExceptionHandler) DataFetcherExceptionHandlerParameters(graphql.execution.DataFetcherExceptionHandlerParameters) ExecutionStrategy(graphql.execution.ExecutionStrategy) ExecutorServiceExecutionStrategy(graphql.execution.ExecutorServiceExecutionStrategy) AsyncExecutionStrategy(graphql.execution.AsyncExecutionStrategy) AsyncSerialExecutionStrategy(graphql.execution.AsyncSerialExecutionStrategy) AsyncExecutionStrategy(graphql.execution.AsyncExecutionStrategy)

Aggregations

AsyncExecutionStrategy (graphql.execution.AsyncExecutionStrategy)1 AsyncSerialExecutionStrategy (graphql.execution.AsyncSerialExecutionStrategy)1 DataFetcherExceptionHandler (graphql.execution.DataFetcherExceptionHandler)1 DataFetcherExceptionHandlerParameters (graphql.execution.DataFetcherExceptionHandlerParameters)1 ExecutionStrategy (graphql.execution.ExecutionStrategy)1 ExecutorServiceExecutionStrategy (graphql.execution.ExecutorServiceExecutionStrategy)1