Package graphql.execution
Interface DataFetcherExceptionHandler
- All Known Implementing Classes:
SimpleDataFetcherExceptionHandler
This is called when an exception is thrown during
DataFetcher.get(DataFetchingEnvironment)
execution-
Method Summary
Modifier and TypeMethodDescriptionhandleException
(DataFetcherExceptionHandlerParameters handlerParameters) When an exception occurs during a call to aDataFetcher
then this handler is called to shape the errors that should be placed in theExecutionResult.getErrors()
list of errors.
-
Method Details
-
handleException
CompletableFuture<DataFetcherExceptionHandlerResult> handleException(DataFetcherExceptionHandlerParameters handlerParameters) When an exception occurs during a call to aDataFetcher
then 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
GraphQLError
s
-