@PublicApi public interface GraphQLError extends java.io.Serializable
Serializable
and hence it can be serialised and placed into a distributed cache. However we
are not aiming to provide long term compatibility and do not intend for you to place this serialised data into permanent storage,
with times frames that cross graphql-java versions. While we don't change things unnecessarily, we may inadvertently break
the serialised compatibility across versions.Modifier and Type | Interface and Description |
---|---|
static interface |
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
A builder of
GraphQLError s |
Modifier and Type | Method and Description |
---|---|
ErrorClassification |
getErrorType() |
default java.util.Map<java.lang.String,java.lang.Object> |
getExtensions() |
java.util.List<SourceLocation> |
getLocations() |
java.lang.String |
getMessage() |
default 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 GraphQLError.Builder<?> |
newError() |
default java.util.Map<java.lang.String,java.lang.Object> |
toSpecification()
The graphql specification says that result of a call should be a map that follows certain rules on what items
should be present.
|
java.lang.String getMessage()
java.util.List<SourceLocation> getLocations()
SourceLocation
describes the beginning of an associated syntax elementErrorClassification getErrorType()
default java.util.List<java.lang.Object> getPath()
default java.util.Map<java.lang.String,java.lang.Object> toSpecification()
default java.util.Map<java.lang.String,java.lang.Object> getExtensions()
static GraphQLError.Builder<?> newError()
GraphQLError
s