Module: GraphQL::Schema::Member::Scoped Private
- Included in:
- Interface::DefinitionMethods, GraphQL::Schema::Member
- Defined in:
- lib/graphql/schema/member/scoped.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#inherited(subclass) ⇒ Object
private
-
#reauthorize_scoped_objects(new_value = nil) ⇒ Object
private
-
#scope_items(items, context) ⇒ Object
private
This is called when a field has
scope: true
.
Instance Method Details
#inherited(subclass) ⇒ 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.
31 32 33 34 35 36 |
# File 'lib/graphql/schema/member/scoped.rb', line 31 def inherited(subclass) super subclass.class_eval do @reauthorize_scoped_objects = nil end end |
#reauthorize_scoped_objects(new_value = nil) ⇒ 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.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/graphql/schema/member/scoped.rb', line 19 def (new_value = nil) if new_value.nil? if @reauthorize_scoped_objects != nil @reauthorize_scoped_objects else find_inherited_value(:reauthorize_scoped_objects, true) end else @reauthorize_scoped_objects = new_value end end |
#scope_items(items, context) ⇒ 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.
This is called when a field has scope: true
.
The field’s return type class receives this call.
By default, it’s a no-op. Override it to scope your objects.
15 16 17 |
# File 'lib/graphql/schema/member/scoped.rb', line 15 def scope_items(items, context) items end |