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>>
-
Field Summary
Fields -
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 should be a list of path entries https://spec.graphql.org/October2021/#sec-Handling-Field-Errorsint
hashCode()
mkExtensions
(Throwable exception) private String
mkMessage
(ResultPath path, Throwable exception) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface graphql.GraphQLError
toSpecification
-
Field Details
-
message
-
path
-
exception
-
locations
-
extensions
-
-
Constructor Details
-
ExceptionWhileDataFetching
public ExceptionWhileDataFetching(ResultPath path, Throwable exception, SourceLocation sourceLocation)
-
-
Method Details
-
mkMessage
-
mkExtensions
-
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 should be a list of path entries https://spec.graphql.org/October2021/#sec-Handling-Field-Errors- 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()
-