Class GraphQLError
java.lang.Object
com.codename1.io.graphql.GraphQLError
public final class GraphQLError
extends java.lang.Object
One entry from a GraphQL response errors array. A GraphQL server
may return errors alongside partial data, so an error here does
not necessarily mean the whole request failed -- inspect
GraphQLResponse.getData() as well.
The spec-defined keys are surfaced directly: message (always
present), path (the response field path the error applies to),
locations (line/column positions in the request document), and
the open-ended extensions object. Unknown keys are ignored.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe open-endedextensionsobject (often carries an errorcode), or null when absent.Source{line, column}locations in the request document, or null when absent.The human-readable error description.List<java.lang.Object> getPath()The response path the error applies to (string field names and integer list indices), or null when the server did not supply one.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
GraphQLError
-
-
Method Details
-
getMessage
The human-readable error description. Never null in a spec-compliant response, but defaults to an empty string when the server omits it. -
getPath
The response path the error applies to (string field names and integer list indices), or null when the server did not supply one. -
getLocations
-
getExtensions
-
toString
- Overrides:
toStringin classjava.lang.Object
-