Interface GraphQLErrorObject


public interface GraphQLErrorObject

Represents a single error.


Example to create an instance using the builder pattern

     GraphQLErrorObject graphQLErrorObject = GraphQLErrorObject.builder()
             .build()
 
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()

      One of the error codes that is listed on the Errors page.

      Returns:
      code
    • values

      @NotNull @NotNull Map<String,Object> values()

      Error-specific additional fields.

      Returns:
      map of the pattern property values
    • setValue

      void setValue(String key, Object value)

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
    • deepCopy

      factory method to create a deep copy of GraphQLErrorObject
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • withGraphQLErrorObject

      default <T> T withGraphQLErrorObject(Function<GraphQLErrorObject,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<GraphQLErrorObject> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference