Interface GraphQLRequest

All Known Subinterfaces:
GraphQLRequest<T>

public interface GraphQLRequest
GraphQLRequest
Example to create an instance using the builder pattern

     GraphQLRequest graphQLRequest = GraphQLRequest.builder()
             .query("{query}")
             .build()
 
  • Method Details

    • getQuery

      @NotNull @NotNull String getQuery()
      Returns:
      query
    • getOperationName

      String getOperationName()
      Returns:
      operationName
    • getVariables

      @Valid @Valid GraphQLVariablesMap getVariables()
      Returns:
      variables
    • setQuery

      void setQuery(String query)
      set query
      Parameters:
      query - value to be set
    • setOperationName

      void setOperationName(String operationName)
      set operationName
      Parameters:
      operationName - value to be set
    • setVariables

      void setVariables(GraphQLVariablesMap variables)
      set variables
      Parameters:
      variables - value to be set
    • of

      static GraphQLRequest of()
      factory method
      Returns:
      instance of GraphQLRequest
    • of

      static GraphQLRequest of(GraphQLRequest template)
      factory method to create a shallow copy GraphQLRequest
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static GraphQLRequestBuilder builder()
      builder factory method for GraphQLRequest
      Returns:
      builder
    • builder

      static GraphQLRequestBuilder builder(GraphQLRequest template)
      create builder for GraphQLRequest instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLRequest

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