Interface GraphQLDuplicateFieldError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLDuplicateFieldError extends GraphQLErrorObject

Returned when a field value conflicts with an existing value causing a duplicate.


Example to create an instance using the builder pattern

     GraphQLDuplicateFieldError graphQLDuplicateFieldError = GraphQLDuplicateFieldError.builder()
             .field("{field}")
             .build()
 
  • Field Details

    • DUPLICATE_FIELD

      static final String DUPLICATE_FIELD
      discriminator value for GraphQLDuplicateFieldError
      See Also:
  • 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 conflicting field.

      Returns:
      field
    • getDuplicateValue

      @NotNull @NotNull Object getDuplicateValue()

      Conflicting duplicate value.

      Returns:
      duplicateValue
    • setField

      void setField(String field)

      Name of the conflicting field.

      Parameters:
      field - value to be set
    • setDuplicateValue

      void setDuplicateValue(Object duplicateValue)

      Conflicting duplicate value.

      Parameters:
      duplicateValue - value to be set
    • of

      factory method
      Returns:
      instance of GraphQLDuplicateFieldError
    • of

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

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

      builder factory method for GraphQLDuplicateFieldError
      Returns:
      builder
    • builder

      create builder for GraphQLDuplicateFieldError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLDuplicateFieldError

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