Class: GQL::Config
- Inherits:
-
Object
- Object
- GQL::Config
- Defined in:
- lib/gql/config.rb
Instance Method Summary collapse
- #default_list_class ⇒ Object
- #default_list_class=(value) ⇒ Object
- #field_types ⇒ Object
- #field_types=(value) ⇒ Object
- #root_node_class ⇒ Object
- #root_node_class=(value) ⇒ Object
Instance Method Details
#default_list_class ⇒ Object
27 28 29 |
# File 'lib/gql/config.rb', line 27 def default_list_class @@default_list_class ||= Connection end |
#default_list_class=(value) ⇒ Object
31 32 33 |
# File 'lib/gql/config.rb', line 31 def default_list_class=(value) @@default_list_class = value end |
#field_types ⇒ Object
19 20 21 |
# File 'lib/gql/config.rb', line 19 def field_types @@field_types ||= {} end |
#field_types=(value) ⇒ Object
23 24 25 |
# File 'lib/gql/config.rb', line 23 def field_types=(value) @@field_types = value end |
#root_node_class ⇒ Object
3 4 5 |
# File 'lib/gql/config.rb', line 3 def root_node_class @@root_node_class ||= nil end |
#root_node_class=(value) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gql/config.rb', line 7 def root_node_class=(value) unless value.nil? || value <= Node raise Errors::InvalidNodeClass.new(value, Node) end if ENV['DEBUG'] value.call :_schema, -> { context[:_schema_root] }, returns: Schema::Node end @@root_node_class = value end |