Package graphql
Class GraphqlErrorBuilder.GraphqlErrorImpl
- java.lang.Object
-
- graphql.GraphqlErrorBuilder.GraphqlErrorImpl
-
- All Implemented Interfaces:
GraphQLError
,java.io.Serializable
- Enclosing class:
- GraphqlErrorBuilder<B extends GraphqlErrorBuilder<B>>
private static class GraphqlErrorBuilder.GraphqlErrorImpl extends java.lang.Object implements GraphQLError
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface graphql.GraphQLError
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
-
Field Summary
Fields Modifier and Type Field Description private ErrorClassification
errorType
private java.util.Map<java.lang.String,java.lang.Object>
extensions
private java.util.List<SourceLocation>
locations
private java.lang.String
message
private java.util.List<java.lang.Object>
path
-
Constructor Summary
Constructors Constructor Description GraphqlErrorImpl(java.lang.String message, java.util.List<SourceLocation> locations, ErrorClassification errorType, java.util.List<java.lang.Object> path, java.util.Map<java.lang.String,java.lang.Object> extensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorClassification
getErrorType()
java.util.Map<java.lang.String,java.lang.Object>
getExtensions()
java.util.List<SourceLocation>
getLocations()
java.lang.String
getMessage()
java.util.List<java.lang.Object>
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-Errorsjava.lang.String
toString()
-
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 Detail
-
message
private final java.lang.String message
-
locations
private final java.util.List<SourceLocation> locations
-
errorType
private final ErrorClassification errorType
-
path
private final java.util.List<java.lang.Object> path
-
extensions
private final java.util.Map<java.lang.String,java.lang.Object> extensions
-
-
Constructor Detail
-
GraphqlErrorImpl
public GraphqlErrorImpl(java.lang.String message, java.util.List<SourceLocation> locations, ErrorClassification errorType, java.util.List<java.lang.Object> path, java.util.Map<java.lang.String,java.lang.Object> extensions)
-
-
Method Detail
-
getMessage
public java.lang.String 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
public java.util.List<SourceLocation> 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
public ErrorClassification getErrorType()
- Specified by:
getErrorType
in interfaceGraphQLError
- Returns:
- an object classifying this error
-
getPath
public java.util.List<java.lang.Object> 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
public java.util.Map<java.lang.String,java.lang.Object> getExtensions()
- Specified by:
getExtensions
in interfaceGraphQLError
- Returns:
- a map of error extensions or null if there are none
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-