Class GraphQLQuery


  • public class GraphQLQuery
    extends java.lang.Object
    This class defines a GraphQL query.
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphQLQuery​(java.lang.String... queryLines)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> GraphQLQuery addVariable​(java.lang.String variableName, T variableValue)
      Adds a variable to the query.
      java.lang.String getQuery()
      Get the JSON encoded query string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphQLQuery

        public GraphQLQuery​(java.lang.String... queryLines)
        Constructor.
        Parameters:
        queryLines - The lines of the query.
    • Method Detail

      • addVariable

        public <T> GraphQLQuery addVariable​(java.lang.String variableName,
                                            T variableValue)
        Adds a variable to the query.
        Type Parameters:
        T - The type of the variable.
        Parameters:
        variableName - The name of the variable.
        variableValue - The value of the variable.
        Returns:
        The updated GraphQLQuery object.
      • getQuery

        public java.lang.String getQuery()
        Get the JSON encoded query string.
        Returns:
        The updated GraphQLQuery object.