Class: GraphQL::Schema::Traversal Private

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/schema/traversal.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Visit the members of this schema and build up artifacts for runtime.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema, introspection: true) ⇒ Traversal

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Traversal.

Parameters:

API:

  • private



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/graphql/schema/traversal.rb', line 14

def initialize(schema, introspection: true)
  @schema = schema
  @introspection = introspection
  @field_instrumenters =
    schema.instrumenters[:field] +
      Schema::BUILT_IN_INSTRUMENTERS +
      schema.instrumenters[:field_after_built_ins]

  @type_map = {}
  @instrumented_field_map = Hash.new { |h, k| h[k] = {} }
  visit(schema, nil)
end

Instance Attribute Details

#instrumented_field_mapHash<String => Hash<String => GraphQL::Field>> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



11
12
13
# File 'lib/graphql/schema/traversal.rb', line 11

def instrumented_field_map
  @instrumented_field_map
end

#type_mapHash<String => GraphQL::BaseType] (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Hash<String => GraphQL::BaseType].

Returns:

  • Hash<String => GraphQL::BaseType]

API:

  • private



8
9
10
# File 'lib/graphql/schema/traversal.rb', line 8

def type_map
  @type_map
end