Package graphql
Class ExceptionWhileDataFetching
java.lang.Object
graphql.ExceptionWhileDataFetching
- All Implemented Interfaces:
GraphQLError
,Serializable
This graphql error will be used if a runtime exception is encountered while a data fetcher is invoked
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface graphql.GraphQLError
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
Constructor Summary
ConstructorsConstructorDescriptionExceptionWhileDataFetching
(ResultPath path, Throwable exception, SourceLocation sourceLocation) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getPath()
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-Formatint
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface graphql.GraphQLError
toSpecification
-
Constructor Details
-
ExceptionWhileDataFetching
public ExceptionWhileDataFetching(ResultPath path, Throwable exception, SourceLocation sourceLocation)
-
-
Method Details
-
getException
-
getMessage
- Specified by:
getMessage
in interfaceGraphQLError
- Returns:
- a description of the error intended for the developer as a guide to understand and correct the error
-
getLocations
- Specified by:
getLocations
in interfaceGraphQLError
- Returns:
- the location(s) within the GraphQL document at which the error occurred. Each
SourceLocation
describes the beginning of an associated syntax element
-
getPath
Description copied from interface:GraphQLError
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-Format- Specified by:
getPath
in interfaceGraphQLError
- Returns:
- the path in list format
-
getExtensions
- Specified by:
getExtensions
in interfaceGraphQLError
- Returns:
- a map of error extensions or null if there are none
-
getErrorType
- Specified by:
getErrorType
in interfaceGraphQLError
- Returns:
- an object classifying this error
-
toString
-
equals
-
hashCode
public int hashCode()
-