Interface GraphQLInvalidFieldError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLInvalidFieldError extends GraphQLErrorObject

Returned when a field has an invalid value.


Example to create an instance using the builder pattern

     GraphQLInvalidFieldError graphQLInvalidFieldError = GraphQLInvalidFieldError.builder()
             .field("{field}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: GraphQLErrorObject

      Error identifier.

      Specified by:
      getCode in interface GraphQLErrorObject
      Returns:
      code
    • getField

      @NotNull @NotNull String getField()

      Name of the field with the invalid value.

      Returns:
      field
    • getInvalidValue

      @NotNull @NotNull Object getInvalidValue()

      Value invalid for the field.

      Returns:
      invalidValue
    • getAllowedValues

      List<Object> getAllowedValues()

      Fixed set of allowed values for the field, if any.

      Returns:
      allowedValues
    • setField

      void setField(String field)

      Name of the field with the invalid value.

      Parameters:
      field - value to be set
    • setInvalidValue

      void setInvalidValue(Object invalidValue)

      Value invalid for the field.

      Parameters:
      invalidValue - value to be set
    • setAllowedValues

      void setAllowedValues(Object... allowedValues)

      Fixed set of allowed values for the field, if any.

      Parameters:
      allowedValues - values to be set
    • setAllowedValues

      void setAllowedValues(List<Object> allowedValues)

      Fixed set of allowed values for the field, if any.

      Parameters:
      allowedValues - values to be set
    • of

      factory method
      Returns:
      instance of GraphQLInvalidFieldError
    • of

      factory method to create a shallow copy GraphQLInvalidFieldError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      builder factory method for GraphQLInvalidFieldError
      Returns:
      builder
    • builder

      create builder for GraphQLInvalidFieldError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLInvalidFieldError

      default <T> T withGraphQLInvalidFieldError(Function<GraphQLInvalidFieldError,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<GraphQLInvalidFieldError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference