Package graphql
Class ExceptionWhileDataFetching
java.lang.Object
graphql.ExceptionWhileDataFetching
- All Implemented Interfaces:
GraphQLError,Serializable
@PublicApi
@NullMarked
public class ExceptionWhileDataFetching
extends Object
implements GraphQLError
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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface graphql.GraphQLError
toSpecification
-
Constructor Details
-
ExceptionWhileDataFetching
public ExceptionWhileDataFetching(ResultPath path, Throwable exception, SourceLocation sourceLocation)
-
-
Method Details
-
getException
-
getMessage
- Specified by:
getMessagein interfaceGraphQLError- Returns:
- a description of the error intended for the developer as a guide to understand and correct the error Non-nullable from the spec: Every error must contain an entry with the key "message" with a string description of the error intended for the developer as a guide to understand and correct the error.
-
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
-
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 ...- 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
-
getErrorType
- Specified by:
getErrorTypein interfaceGraphQLError- Returns:
- an object classifying this error
-
toString
-
equals
-
hashCode
public int hashCode()
-