Sha256: f6453256ce757bc56793301c7437331136683297b95f68eb47b6956bf9e304af
Contents?: true
Size: 570 Bytes
Versions: 6
Compression:
Stored size: 570 Bytes
Contents
# frozen_string_literal: true require 'graphql/client' require 'graphql/client/http' module ShopifyAPI # GraphQL API. class GraphQL def initialize uri = Base.site.dup uri.path = Base.api_version.construct_graphql_path @http = ::GraphQL::Client::HTTP.new(uri.to_s) do define_method(:headers) do |_context| Base.headers end end @schema = ::GraphQL::Client.load_schema(@http) @client = ::GraphQL::Client.new(schema: @schema, execute: @http) end delegate :parse, :query, to: :@client end end
Version data entries
6 entries across 6 versions & 1 rubygems