Sha256: 05eb4a43e4e9e97e17a7362776643bd4ab682e99da8c1bbd343252a4f0db1824

Contents?: true

Size: 353 Bytes

Versions: 2

Compression:

Stored size: 353 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  module Client
    module Query
      class QueryDocument
        def self.new(schema, name = nil)
          document = Document.new(schema)
          query = document.add_query(name)

          if block_given?
            yield query
          end

          query
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
graphql_client-0.4.1 lib/graphql_client/query/query_document.rb
graphql_client-0.3.3 lib/graphql_client/query/query_document.rb