Package graphql
Class GraphqlErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
graphql.GraphQLException
graphql.GraphqlErrorException
- All Implemented Interfaces:
GraphQLError,Serializable
- Direct Known Subclasses:
CoercingParseLiteralException,CoercingParseValueException,CoercingSerializeException
A base class for graphql runtime exceptions that also implement
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classGraphqlErrorException.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. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGraphqlErrorException(GraphqlErrorException.BuilderBase<?, ?> builder) -
Method Summary
Modifier and TypeMethodDescriptiongetPath()The graphql spec says that the (optional) path field of any error must be a list of path entries starting at the root of the response and ending with the field associated with the error https://spec.graphql.org/draft/#sec-Errors.Error-Result-FormatMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface graphql.GraphQLError
getMessage, toSpecification
-
Constructor Details
-
GraphqlErrorException
-
-
Method Details
-
getLocations
- Specified by:
getLocationsin interfaceGraphQLError- Returns:
- the location(s) within the GraphQL document at which the error occurred. Each
SourceLocationdescribes the beginning of an associated syntax element
-
getErrorType
- Specified by:
getErrorTypein interfaceGraphQLError- Returns:
- an object classifying this error
-
getPath
Description copied from interface:GraphQLErrorThe graphql spec says that the (optional) path field of any error must be a list of path entries starting at the root of the response and ending with the field associated with the error https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format- Specified by:
getPathin interfaceGraphQLError- Returns:
- the path in list format
-
getExtensions
- Specified by:
getExtensionsin interfaceGraphQLError- Returns:
- a map of error extensions or null if there are none
-
newErrorException
-