Class MyDataFetcherExceptionResolverAdapter
java.lang.Object
org.springframework.graphql.execution.DataFetcherExceptionResolverAdapter
org.allGraphQLCases.server.config.MyDataFetcherExceptionResolverAdapter
- All Implemented Interfaces:
org.springframework.graphql.execution.DataFetcherExceptionResolver
@Component
public class MyDataFetcherExceptionResolverAdapter
extends org.springframework.graphql.execution.DataFetcherExceptionResolverAdapter
A Spring bean that register
This class is both a sample, and the support for an IT test that checks proper error management on client side, when an error occurs on server side.
DataFetcherExceptionResolverAdapter
to configure the way Java exceptions are
mapped to GraphQL errors.This class is both a sample, and the support for an IT test that checks proper error management on client side, when an error occurs on server side.
- Author:
- etienne-sf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected graphql.GraphQLError
resolveToSingleError
(Throwable ex, graphql.schema.DataFetchingEnvironment env) Methods inherited from class org.springframework.graphql.execution.DataFetcherExceptionResolverAdapter
from, isThreadLocalContextAware, resolveException, resolveToMultipleErrors, setThreadLocalContextAware
-
Constructor Details
-
MyDataFetcherExceptionResolverAdapter
public MyDataFetcherExceptionResolverAdapter()
-
-
Method Details
-
resolveToSingleError
protected graphql.GraphQLError resolveToSingleError(Throwable ex, graphql.schema.DataFetchingEnvironment env) - Overrides:
resolveToSingleError
in classorg.springframework.graphql.execution.DataFetcherExceptionResolverAdapter
-