Class: Lucid::Shopify::GraphQLPostRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/lucid/shopify/graphql_post_request.rb

Instance Method Summary collapse

Methods inherited from Request

#credentials, #http_headers, #http_method, #options, #path, #url

Constructor Details

#initialize(credentials, query, variables: {}) ⇒ GraphQLPostRequest

Returns a new instance of GraphQLPostRequest.

Parameters:

  • credentials (Credentials)
  • query (String)

    the GraphQL query

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

    the GraphQL variables (if any)

See Also:



16
17
18
19
20
21
# File 'lib/lucid/shopify/graphql_post_request.rb', line 16

def initialize(credentials, query, variables: {})
  super(credentials, :post, 'graphql', json: {
    query: query,
    variables: variables,
  })
end