Class GraphQLRequestDto

java.lang.Object
de.qytera.qtaf.xray.dto.request.graphql.GraphQLRequestDto

public class GraphQLRequestDto extends Object
A generic GraphQL request. These are split into a query property and a variables property. The variables property is used in parameterized queries and can contain arbitrary data for each variable.
See Also:
  • Constructor Details

    • GraphQLRequestDto

      public GraphQLRequestDto()
  • Method Details

    • addVariable

      public void addVariable(String name, Object value)
      Adds a variable and its content to the GraphQL request.
      Parameters:
      name - the name of the variable
      value - the variable's data
    • getQuery

      public String getQuery()
      The GraphQL query.
    • getVariables

      public com.google.gson.JsonObject getVariables()
      A GraphQL variable mapping.
    • setQuery

      public void setQuery(String query)
      The GraphQL query.
    • setVariables

      public void setVariables(com.google.gson.JsonObject variables)
      A GraphQL variable mapping.