Class ValidationError

java.lang.Object
graphql.validation.ValidationError
All Implemented Interfaces:
GraphQLError, Serializable

@PublicApi @NullMarked public class ValidationError extends Object implements GraphQLError
See Also:
  • Method Details

    • getValidationErrorType

      public @Nullable ValidationErrorClassification getValidationErrorType()
    • getMessage

      public String getMessage()
      Specified by:
      getMessage in interface GraphQLError
      Returns:
      a description of the error intended for the developer as a guide to understand and correct the error Non-nullable from the spec: Every error must contain an entry with the key "message" with a string description of the error intended for the developer as a guide to understand and correct the error.
    • getDescription

      public String getDescription()
    • getLocations

      public List<SourceLocation> getLocations()
      Specified by:
      getLocations in interface GraphQLError
      Returns:
      the location(s) within the GraphQL document at which the error occurred. Each SourceLocation describes the beginning of an associated syntax element
    • getErrorType

      public ErrorType getErrorType()
      Specified by:
      getErrorType in interface GraphQLError
      Returns:
      an object classifying this error
    • getQueryPath

      public List<String> getQueryPath()
    • getExtensions

      public Map<String,Object> getExtensions()
      Specified by:
      getExtensions in interface GraphQLError
      Returns:
      a map of error extensions or null if there are none
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • newValidationError

      public static ValidationError.Builder newValidationError()