Interface GraphQLDataResponse


public interface GraphQLDataResponse
GraphQLResponse
Example to create an instance using the builder pattern

     GraphQLDataResponse graphQLResponse = GraphQLDataResponse.builder()
             .build()
 
  • Method Details

    • getData

      GraphQLData getData()
      Returns:
      data
    • getErrors

      @Valid @Valid List<GraphQLError> getErrors()
      Returns:
      errors
    • setData

      void setData(GraphQLData data)
      set data
      Parameters:
      data - value to be set
    • setErrors

      void setErrors(GraphQLError... errors)
      set errors
      Parameters:
      errors - values to be set
    • setErrors

      void setErrors(List<GraphQLError> errors)
      set errors
      Parameters:
      errors - values to be set
    • getData

      default <T> T getData(GraphQLRequest<T> request)
    • of

      static GraphQLDataResponse of()
      factory method
      Returns:
      instance of GraphQLResponse
    • of

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

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

      static GraphQLDataResponseBuilder builder()
      builder factory method for GraphQLResponse
      Returns:
      builder
    • builder

      create builder for GraphQLResponse instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLDataResponse

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