@PublicApi public class GraphqlErrorException extends GraphQLException implements GraphQLError
GraphQLError
and can be used
in a general sense direct or have specialisations made of it.
This is aimed amongst other reasons at Kotlin consumers due to https://github.com/graphql-java/graphql-java/issues/1690 as well as being a way to share common code.
Modifier and Type | Class and Description |
---|---|
static class |
GraphqlErrorException.Builder |
protected static class |
GraphqlErrorException.BuilderBase<T extends GraphqlErrorException.BuilderBase<T,B>,B extends GraphqlErrorException>
A trait like base class that contains the properties that GraphqlErrorException handles and can
be used by other classes to derive their own builders.
|
Modifier | Constructor and Description |
---|---|
protected |
GraphqlErrorException(GraphqlErrorException.BuilderBase<?,?> builder) |
Modifier and Type | Method and Description |
---|---|
ErrorClassification |
getErrorType() |
java.util.Map<java.lang.String,java.lang.Object> |
getExtensions() |
java.util.List<SourceLocation> |
getLocations() |
java.util.List<java.lang.Object> |
getPath()
The graphql spec says that the (optional) path field of any error should be a list
of path entries https://spec.graphql.org/October2021/#sec-Handling-Field-Errors
|
static GraphqlErrorException.Builder |
newErrorException() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMessage, newError, toSpecification
protected GraphqlErrorException(GraphqlErrorException.BuilderBase<?,?> builder)
public java.util.List<SourceLocation> getLocations()
getLocations
in interface GraphQLError
SourceLocation
describes the beginning of an associated syntax elementpublic ErrorClassification getErrorType()
getErrorType
in interface GraphQLError
public java.util.List<java.lang.Object> getPath()
GraphQLError
getPath
in interface GraphQLError
public java.util.Map<java.lang.String,java.lang.Object> getExtensions()
getExtensions
in interface GraphQLError
public static GraphqlErrorException.Builder newErrorException()