Class GraphQLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.codename1.backend.graphql.GraphQLException
An error a resolver throws to put a message of its own in the response's
errors, as Spring for GraphQL's GraphQLError does.
Any other exception thrown by a resolver is reported as INTERNAL_ERROR
with no detail, so an exception message never leaks server internals to a
client. Throw this one for messages that are meant to be read.
The field that threw resolves to null, and the rest of the response is
still answered: GraphQL reports partial results.
-
Constructor Summary
ConstructorsConstructorDescriptionGraphQLException(String message) An error with this message for the client.GraphQLException(String message, Map extensions) An error with this message andextensions, written as the error'sextensionsobject --classificationorcodeby convention. -
Method Summary
Modifier and TypeMethodDescriptionintThe column in the document the error refers to, or 0.The error'sextensions, or null.intgetLine()The line in the document the error refers to, or 0.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GraphQLException
An error with this message for the client. -
GraphQLException
-
-
Method Details
-
getLine
public int getLine()The line in the document the error refers to, or 0. -
getColumn
public int getColumn()The column in the document the error refers to, or 0. -
getExtensions
The error'sextensions, or null.
-