Class: ShopifyAPI::GraphQL::HTTPClient

Inherits:
GraphQL::Client::HTTP
  • Object
show all
Defined in:
lib/shopify_api/graphql/http_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_version) ⇒ HTTPClient

Returns a new instance of HTTPClient.


7
8
9
# File 'lib/shopify_api/graphql/http_client.rb', line 7

def initialize(api_version)
  @api_version = api_version
end

Instance Method Details

#headers(_context) ⇒ Object


11
12
13
# File 'lib/shopify_api/graphql/http_client.rb', line 11

def headers(_context)
  ShopifyAPI::Base.headers
end

#uriObject


15
16
17
18
19
# File 'lib/shopify_api/graphql/http_client.rb', line 15

def uri
  ShopifyAPI::Base.site.dup.tap do |uri|
    uri.path = @api_version.construct_graphql_path
  end
end