Sha256: 235692e0c441f38e241071535df79f23cd45541a4daab96da1e4601010654415

Contents?: true

Size: 801 Bytes

Versions: 48

Compression:

Stored size: 801 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)
        GraphQL::Deprecation.warn "#{self.class}#[] is deprecated; use `operation_definitions[]` instead"
        operation_definitions[key]
      end

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

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
graphql-1.13.23 lib/graphql/internal_representation/document.rb
graphql-1.13.22 lib/graphql/internal_representation/document.rb
graphql-1.13.21 lib/graphql/internal_representation/document.rb
graphql-1.13.20 lib/graphql/internal_representation/document.rb
graphql-1.13.19 lib/graphql/internal_representation/document.rb
graphql-1.13.18 lib/graphql/internal_representation/document.rb
graphql-1.13.17 lib/graphql/internal_representation/document.rb
graphql-1.13.16 lib/graphql/internal_representation/document.rb
graphql-1.13.15 lib/graphql/internal_representation/document.rb
graphql-1.13.14 lib/graphql/internal_representation/document.rb
graphql-1.13.13 lib/graphql/internal_representation/document.rb
graphql_cody-1.13.0 lib/graphql/internal_representation/document.rb
graphql-1.13.12 lib/graphql/internal_representation/document.rb
graphql-1.13.11 lib/graphql/internal_representation/document.rb
graphql-1.13.10 lib/graphql/internal_representation/document.rb
graphql-1.13.9 lib/graphql/internal_representation/document.rb
graphql-1.12.24 lib/graphql/internal_representation/document.rb
graphql-1.13.8 lib/graphql/internal_representation/document.rb
graphql-1.13.7 lib/graphql/internal_representation/document.rb
graphql-1.13.6 lib/graphql/internal_representation/document.rb