Sha256: 1240ecc2947405d1a4bfa40d6c82d6d29788a4564b1635ed05e7d7ef00e24186

Contents?: true

Size: 759 Bytes

Versions: 117

Compression:

Stored size: 759 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module InternalRepresentation
    class Document
      # @return [Hash<String, Node>] Operation Nodes of this query
      attr_reader :operation_definitions

      # @return [Hash<String, Node>] Fragment definition Nodes of this query
      attr_reader :fragment_definitions

      def initialize
        @operation_definitions = {}
        @fragment_definitions = {}
      end

      def [](key)
        warn "#{self.class}#[] is deprecated; use `operation_definitions[]` instead"
        operation_definitions[key]
      end

      def each(&block)
        warn "#{self.class}#each is deprecated; use `operation_definitions.each` instead"
        operation_definitions.each(&block)
      end
    end
  end
end

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
graphql-1.11.10 lib/graphql/internal_representation/document.rb
graphql-1.11.9 lib/graphql/internal_representation/document.rb
graphql-1.11.8 lib/graphql/internal_representation/document.rb
graphql-1.12.1 lib/graphql/internal_representation/document.rb
graphql-1.12.0 lib/graphql/internal_representation/document.rb
graphql-1.11.7 lib/graphql/internal_representation/document.rb
graphql-1.11.6 lib/graphql/internal_representation/document.rb
graphql-1.8.18 lib/graphql/internal_representation/document.rb
graphql-1.11.5 lib/graphql/internal_representation/document.rb
graphql-1.11.4 lib/graphql/internal_representation/document.rb
graphql-1.11.3 lib/graphql/internal_representation/document.rb
graphql-1.11.2 lib/graphql/internal_representation/document.rb
graphql-1.10.14 lib/graphql/internal_representation/document.rb
graphql-1.11.1 lib/graphql/internal_representation/document.rb
graphql-1.10.13 lib/graphql/internal_representation/document.rb
graphql-1.11.0 lib/graphql/internal_representation/document.rb
graphql-1.10.12 lib/graphql/internal_representation/document.rb
graphql-1.9.21 lib/graphql/internal_representation/document.rb
graphql-1.10.11 lib/graphql/internal_representation/document.rb
graphql-1.9.20 lib/graphql/internal_representation/document.rb