Package graphql

Class ParseAndValidateResult


  • @PublicApi
    public class ParseAndValidateResult
    extends java.lang.Object
    A result object used in ParseAndValidate helper that indicates the outcomes of a parse and validate operation.
    • Method Detail

      • isFailure

        public boolean isFailure()
        Returns:
        true if there was a parse exception or the validation failed
      • getDocument

        public Document getDocument()
        Returns:
        the parsed document or null if it's syntactically invalid.
      • getVariables

        public java.util.Map<java.lang.String,​java.lang.Object> getVariables()
        Returns:
        the document variables or null if it's syntactically invalid.
      • getDocumentAndVariables

        public DocumentAndVariables getDocumentAndVariables()
        Returns:
        the parsed document and variables or null if it's syntactically invalid.
      • getSyntaxException

        public InvalidSyntaxException getSyntaxException()
        Returns:
        the syntax exception or null if it's syntactically valid.
      • getValidationErrors

        public java.util.List<ValidationError> getValidationErrors()
        Returns:
        a list of validation errors, which might be empty if it's syntactically invalid.
      • getErrors

        public java.util.List<GraphQLError> getErrors()
        A list of all the errors (parse and validate) that have occurred
        Returns:
        the errors that have occurred or empty list if there are none