Sha256: 05265c46e8c4d3bb5763ac01e5fd01625fb31eaebff9361deec16b16c8d7dd3d
Contents?: true
Size: 692 Bytes
Versions: 7
Compression:
Stored size: 692 Bytes
Contents
# frozen_string_literal: true module ShopifyApiBruv module Clients module Graphql class Client attr_reader :config, :http_client def initialize(config:) @config = config @http_client = HttpClient.new(config:, path: "admin/api/#{config.api_version}") end def request(query:, variables: nil, headers: nil) http_client.request( http_request: HttpRequest.new( method: :post, path: '/graphql.json', body: { query:, variables: }, content_type: 'application/json', headers: ) ) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems