Interface GraphQLErrorObject

All Known Subinterfaces:
GraphQLTooManyRequestsError

public interface GraphQLErrorObject

Represents a single error.


Example to create a subtype instance using the builder pattern

     GraphQLErrorObject graphQLErrorObject = GraphQLErrorObject.tooManyRequestsBuilder()
             .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
    • copyDeep

      GraphQLErrorObject copyDeep()
    • deepCopy

      @Nullable static GraphQLErrorObject deepCopy(@Nullable GraphQLErrorObject template)
      factory method to create a deep copy of GraphQLErrorObject
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • tooManyRequestsBuilder

      static GraphQLTooManyRequestsErrorBuilder tooManyRequestsBuilder()
      builder for tooManyRequests subtype
      Returns:
      builder
    • 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