public interface ResponseError
Modifier and Type | Method and Description |
---|---|
ErrorClassification |
getErrorType()
Return a classification for the error that is specific to GraphQL Java.
|
Map<String,Object> |
getExtensions()
Return a map with GraphQL Java and other implementation specific protocol
error detail extensions such as
getErrorType() , possibly empty. |
List<SourceLocation> |
getLocations()
Return a list of locations in the GraphQL document, if the error can be
associated to a particular point in the document.
|
String |
getMessage()
Return the message with a description of the error intended for the
developer as a guide to understand and correct the error.
|
List<Object> |
getParsedPath()
Return the path to a response field which experienced the error,
if the error can be associated to a particular field in the result, or
otherwise an empty list.
|
String |
getPath()
Return a String representation of the
parsed path ,
or an empty String if the error is not associated with a field. |
@Nullable String getMessage()
ErrorClassification getErrorType()
"extensions"
in the
response map.String getPath()
parsed path
,
or an empty String if the error is not associated with a field.
Example paths:
"hero" "hero.name" "hero.friends" "hero.friends[2]" "hero.friends[2].name"
List<Object> getParsedPath()
null
result is intentional or caused by an error.
This list contains path segments starting at the root of the response and ending with the field associated with the error. Path segments that represent fields are strings, and path segments that represent list indices are 0-indexed integers. If the error happens in an aliased field, the path uses the aliased name, since it represents a path in the response, not in the request.
List<SourceLocation> getLocations()
Map<String,Object> getExtensions()
getErrorType()
, possibly empty.