Interface DataFetcherExceptionResolver

All Known Subinterfaces:
HandlerDataFetcherExceptionResolver
All Known Implementing Classes:
DataFetcherExceptionResolverAdapter, ReactiveSecurityDataFetcherExceptionResolver, SecurityDataFetcherExceptionResolver

public interface DataFetcherExceptionResolver
Contract to resolve exceptions from DataFetchers. Resolves are typically declared as Spring beans and invoked in turn until one resolves the exception by emitting a (possibly empty) GraphQLError list. Use the static factory method createExceptionHandler(java.util.List<org.springframework.graphql.execution.DataFetcherExceptionResolver>) to create a DataFetcherExceptionHandler from a list of resolvers.

Resolver implementations can extend DataFetcherExceptionResolverAdapter and override one of its resolveToSingleError or resolveToMultipleErrors methods that resolve the exception synchronously.

Resolver implementations can use ErrorType to classify errors using one of several common categories.

Since:
1.0.0
Author:
Rossen Stoyanchev
See Also: