Class: HQ::GraphQL::Config
- Inherits:
-
Struct
- Object
- Struct
- HQ::GraphQL::Config
- Defined in:
- lib/hq/graphql/config.rb
Instance Attribute Summary collapse
-
#authorize ⇒ Object
Returns the value of attribute authorize.
-
#authorize_field ⇒ Object
Returns the value of attribute authorize_field.
-
#default_scope ⇒ Object
Returns the value of attribute default_scope.
-
#extract_class ⇒ Object
Returns the value of attribute extract_class.
-
#resource_lookup ⇒ Object
Returns the value of attribute resource_lookup.
-
#use_experimental_associations ⇒ Object
Returns the value of attribute use_experimental_associations.
Instance Method Summary collapse
-
#initialize(default_scope: ->(scope, _context) { scope }, extract_class: ->(klass) { klass.to_s.gsub(/^Resources|Resource$/, "") }, resource_lookup: ->(klass) { "::Resources::#{klass}Resource".safe_constantize || "::Resources::#{klass}".safe_constantize }, **options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(default_scope: ->(scope, _context) { scope }, extract_class: ->(klass) { klass.to_s.gsub(/^Resources|Resource$/, "") }, resource_lookup: ->(klass) { "::Resources::#{klass}Resource".safe_constantize || "::Resources::#{klass}".safe_constantize }, **options) ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 |
# File 'lib/hq/graphql/config.rb', line 14 def initialize( default_scope: ->(scope, _context) { scope }, extract_class: ->(klass) { klass.to_s.gsub(/^Resources|Resource$/, "") }, resource_lookup: ->(klass) { "::Resources::#{klass}Resource".safe_constantize || "::Resources::#{klass}".safe_constantize }, ** ) super end |
Instance Attribute Details
#authorize ⇒ Object
Returns the value of attribute authorize
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def @authorize end |
#authorize_field ⇒ Object
Returns the value of attribute authorize_field
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def @authorize_field end |
#default_scope ⇒ Object
Returns the value of attribute default_scope
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def default_scope @default_scope end |
#extract_class ⇒ Object
Returns the value of attribute extract_class
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def extract_class @extract_class end |
#resource_lookup ⇒ Object
Returns the value of attribute resource_lookup
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def resource_lookup @resource_lookup end |
#use_experimental_associations ⇒ Object
Returns the value of attribute use_experimental_associations
5 6 7 |
# File 'lib/hq/graphql/config.rb', line 5 def use_experimental_associations @use_experimental_associations end |