Class: GraphQL::Schema::IntrospectionSystem Private

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

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.

Defined Under Namespace

Classes: PerFieldProxyResolve

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema) ⇒ IntrospectionSystem

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 IntrospectionSystem



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/graphql/schema/introspection_system.rb', line 7

def initialize(schema)
  @schema = schema
  @built_in_namespace = GraphQL::Introspection
  @custom_namespace = schema.introspection_namespace || @built_in_namespace

  # Use to-graphql to avoid sharing with any previous instantiations
  @schema_type = load_constant(:SchemaType).to_graphql
  @type_type = load_constant(:TypeType).to_graphql
  @field_type = load_constant(:FieldType).to_graphql
  @directive_type = load_constant(:DirectiveType).to_graphql
  @enum_value_type = load_constant(:EnumValueType).to_graphql
  @input_value_type = load_constant(:InputValueType).to_graphql
  @type_kind_enum = load_constant(:TypeKindEnum).to_graphql
  @directive_location_enum = load_constant(:DirectiveLocationEnum).to_graphql
  @entry_point_fields = get_fields_from_class(class_sym: :EntryPoints)
  @dynamic_fields = get_fields_from_class(class_sym: :DynamicFields)
end

Instance Attribute Details

#schema_typeObject (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.



5
6
7
# File 'lib/graphql/schema/introspection_system.rb', line 5

def schema_type
  @schema_type
end

#type_typeObject (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.



5
6
7
# File 'lib/graphql/schema/introspection_system.rb', line 5

def type_type
  @type_type
end

#typename_fieldObject (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.



5
6
7
# File 'lib/graphql/schema/introspection_system.rb', line 5

def typename_field
  @typename_field
end

Instance Method Details

#dynamic_field(name:) ⇒ Object

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.



50
51
52
# File 'lib/graphql/schema/introspection_system.rb', line 50

def dynamic_field(name:)
  @dynamic_fields[name]
end

#dynamic_fieldsObject

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.



46
47
48
# File 'lib/graphql/schema/introspection_system.rb', line 46

def dynamic_fields
  @dynamic_fields.values
end

#entry_point(name:) ⇒ Object

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.



42
43
44
# File 'lib/graphql/schema/introspection_system.rb', line 42

def entry_point(name:)
  @entry_point_fields[name]
end

#entry_pointsObject

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.



38
39
40
# File 'lib/graphql/schema/introspection_system.rb', line 38

def entry_points
  @entry_point_fields.values
end

#object_typesObject

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.



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/graphql/schema/introspection_system.rb', line 25

def object_types
  [
    @schema_type,
    @type_type,
    @field_type,
    @directive_type,
    @enum_value_type,
    @input_value_type,
    @type_kind_enum,
    @directive_location_enum,
  ]
end