Interface GraphQLError


public interface GraphQLError
  • Method Details

    • getMessage

      String getMessage()
      Textual description of the error, supplied by the service.
    • getLocations

      List<Map<String,Integer>> getLocations()
      List of locations in the request that correspond to this error. Each location is a map that should contain the `line` and `column` items.
    • getPath

      Object[] getPath()
      The path to the response field where the error arose. This is represented as an array, where each item is either a string (when it represents a field), or an integer (when it represents an index).
    • getExtensions

      Map<String,Object> getExtensions()
      Contents of the `extensions` field. This is used by GraphQL services to pass extra information about the error.
    • getOtherFields

      Map<String,Object> getOtherFields()
      Any other fields beyond message, locations, path and extensions. These are discouraged by the spec, but if a GraphQL service adds them, they will appear in this map.
    • getStringExtension

      default String getStringExtension(String name)
      Contents of one of the `extensions` fields, converted to a String. This is used by GraphQL services to pass extra information about the error.
    • getException

      default String getException()
      The name of the exception thrown in the service. This may not be stable, so it's generally better to use the getCode()
    • getClassification

      default String getClassification()
      The general type of failure
    • getCode

      default String getCode()
      A stable error code
    • getDescription

      default String getDescription()
      A human-readable description of the failure
    • getValidationErrorType

      default String getValidationErrorType()
      The type of mistake leading to the rejection of the GraphQL query
    • getQueryPath

      default String getQueryPath()
      The path within the GraphQL query that was rejected