Class GraphQLError
java.lang.Object
com.codename1.io.graphql.GraphQLError
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.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()Returns a string representation of the object.
-
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
-
getLocations
-
getExtensions
-
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-