Module: GraphqlUtil::GraphqlUtilMethods

Defined in:
lib/graphql_util.rb

Instance Method Summary collapse

Instance Method Details

#query(query, variables: {}) ⇒ GraphQL::Client::Response

Calls the Client query method to perform the passed GraphQL Query / Mutation request with variables

Parameters:

  • query (GraphQL::Client::OperationDefinition)

    GraphQL Operation

  • variables (Hash) (defaults to: {})

    Variables to be passed to the GraphQL Query / Mutation

Returns:

  • (GraphQL::Client::Response)

    Request Response



57
58
59
# File 'lib/graphql_util.rb', line 57

def query(query, variables: {})
  self::GRAPHQL_UTIL_CLIENT.query(query, variables: variables)
end