Package graphql.execution
Interface DataFetcherExceptionHandler
-
- All Known Implementing Classes:
SimpleDataFetcherExceptionHandler
@PublicSpi public interface DataFetcherExceptionHandler
This is called when an exception is thrown duringDataFetcher.get(DataFetchingEnvironment)execution
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<DataFetcherExceptionHandlerResult>handleException(DataFetcherExceptionHandlerParameters handlerParameters)When an exception occurs during a call to aDataFetcherthen this handler is called to shape the errors that should be placed in theExecutionResult.getErrors()list of errors.
-
-
-
Method Detail
-
handleException
java.util.concurrent.CompletableFuture<DataFetcherExceptionHandlerResult> handleException(DataFetcherExceptionHandlerParameters handlerParameters)
When an exception occurs during a call to aDataFetcherthen this handler is called to shape the errors that should be placed in theExecutionResult.getErrors()list of errors.- Parameters:
handlerParameters- the parameters to this callback- Returns:
- a result that can contain custom formatted
GraphQLErrors
-
-