Package graphql
Class GraphqlErrorBuilder.GraphqlErrorImpl
java.lang.Object
graphql.GraphqlErrorBuilder.GraphqlErrorImpl
- All Implemented Interfaces:
GraphQLError
,Serializable
- Enclosing class:
GraphqlErrorBuilder<B extends GraphqlErrorBuilder<B>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface graphql.GraphQLError
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ErrorClassification
private final List
<SourceLocation> private final String
-
Constructor Summary
ConstructorsConstructorDescriptionGraphqlErrorImpl
(String message, List<SourceLocation> locations, ErrorClassification errorType, List<Object> path, Map<String, Object> extensions) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface graphql.GraphQLError
toSpecification
-
Field Details
-
message
-
locations
-
errorType
-
path
-
extensions
-
-
Constructor Details
-
GraphqlErrorImpl
public GraphqlErrorImpl(String message, List<SourceLocation> locations, ErrorClassification errorType, List<Object> path, Map<String, Object> extensions)
-
-
Method Details
-
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
-
getErrorType
- Specified by:
getErrorType
in interfaceGraphQLError
- Returns:
- an object classifying this error
-
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
-
toString
-