Class: GraphQL::Schema::Warden::NullWarden Private
- Inherits:
-
Object
- Object
- GraphQL::Schema::Warden::NullWarden
- Defined in:
- lib/graphql/schema/warden.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.
Instance Attribute Summary collapse
-
#skip_warning ⇒ Object
writeonly
private
No-op, but for compatibility:.
-
#visibility_profile ⇒ Object
readonly
private
Instance Method Summary collapse
-
#arguments(argument_owner, ctx = nil) ⇒ Object
private
-
#directives ⇒ Object
private
-
#enum_values(enum_defn) ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#fields(type_defn) ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#get_argument(parent_type, argument_name) ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#get_field(parent_type, field_name) ⇒ Object
private
-
#get_type(type_name) ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#initialize(_filter = nil, context:, schema:) ⇒ NullWarden
constructor
private
A new instance of NullWarden.
-
#interface_type_memberships(obj_type, _ctx = nil) ⇒ Object
private
-
#interfaces(obj_type) ⇒ Object
private
-
#loadable?(type, _ctx) ⇒ Boolean
private
-
#loadable_possible_types(union_type, _ctx) ⇒ Object
private
-
#possible_types(type_defn) ⇒ Object
private
-
#reachable_type?(type_name) ⇒ Boolean
private
-
#reachable_types ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#root_type_for_operation(op_name) ⇒ Object
private
-
#types ⇒ Object
private
rubocop:disable Development/ContextIsPassedCop.
-
#visible_argument?(arg_defn, _ctx = nil) ⇒ Boolean
private
-
#visible_enum_value?(enum_value, _ctx = nil) ⇒ Boolean
private
-
#visible_field?(field_defn, _ctx = nil, owner = nil) ⇒ Boolean
private
-
#visible_type?(type_defn, _ctx = nil) ⇒ Boolean
private
-
#visible_type_membership?(type_membership, _ctx = nil) ⇒ Boolean
private
Constructor Details
#initialize(_filter = nil, context:, schema:) ⇒ NullWarden
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 NullWarden.
83 84 85 86 |
# File 'lib/graphql/schema/warden.rb', line 83 def initialize(_filter = nil, context:, schema:) @schema = schema @visibility_profile = Warden::VisibilityProfile.new(self) end |
Instance Attribute Details
#skip_warning=(value) ⇒ Object (writeonly)
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.
No-op, but for compatibility:
89 90 91 |
# File 'lib/graphql/schema/warden.rb', line 89 def skip_warning=(value) @skip_warning = value end |
#visibility_profile ⇒ Object (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.
91 92 93 |
# File 'lib/graphql/schema/warden.rb', line 91 def visibility_profile @visibility_profile end |
Instance Method Details
#arguments(argument_owner, ctx = 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.
100 |
# File 'lib/graphql/schema/warden.rb', line 100 def arguments(argument_owner, ctx = nil); argument_owner.all_argument_definitions; end |
#directives ⇒ 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.
105 |
# File 'lib/graphql/schema/warden.rb', line 105 def directives; @schema.directives.values; end |
#enum_values(enum_defn) ⇒ 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.
rubocop:disable Development/ContextIsPassedCop
101 |
# File 'lib/graphql/schema/warden.rb', line 101 def enum_values(enum_defn); enum_defn.enum_values(Query::NullContext.instance); end |
#fields(type_defn) ⇒ 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.
rubocop:disable Development/ContextIsPassedCop
106 |
# File 'lib/graphql/schema/warden.rb', line 106 def fields(type_defn); type_defn.all_field_definitions; end |
#get_argument(parent_type, argument_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.
rubocop:disable Development/ContextIsPassedCop
102 |
# File 'lib/graphql/schema/warden.rb', line 102 def get_argument(parent_type, argument_name); parent_type.get_argument(argument_name); end |
#get_field(parent_type, 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.
107 |
# File 'lib/graphql/schema/warden.rb', line 107 def get_field(parent_type, field_name); @schema.get_field(parent_type, field_name); end |
#get_type(type_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.
rubocop:disable Development/ContextIsPassedCop
99 |
# File 'lib/graphql/schema/warden.rb', line 99 def get_type(type_name); @schema.get_type(type_name, Query::NullContext.instance, false); end |
#interface_type_memberships(obj_type, _ctx = 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.
98 |
# File 'lib/graphql/schema/warden.rb', line 98 def interface_type_memberships(obj_type, _ctx = nil); obj_type.interface_type_memberships; end |
#interfaces(obj_type) ⇒ 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.
113 |
# File 'lib/graphql/schema/warden.rb', line 113 def interfaces(obj_type); obj_type.interfaces; end |
#loadable?(type, _ctx) ⇒ Boolean
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.
109 |
# File 'lib/graphql/schema/warden.rb', line 109 def loadable?(type, _ctx); true; end |
#loadable_possible_types(union_type, _ctx) ⇒ 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.
110 |
# File 'lib/graphql/schema/warden.rb', line 110 def loadable_possible_types(union_type, _ctx); union_type.possible_types; end |
#possible_types(type_defn) ⇒ 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.
112 |
# File 'lib/graphql/schema/warden.rb', line 112 def possible_types(type_defn); @schema.possible_types(type_defn, Query::NullContext.instance, false); end |
#reachable_type?(type_name) ⇒ Boolean
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.
108 |
# File 'lib/graphql/schema/warden.rb', line 108 def reachable_type?(type_name); true; end |
#reachable_types ⇒ 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.
rubocop:disable Development/ContextIsPassedCop
111 |
# File 'lib/graphql/schema/warden.rb', line 111 def reachable_types; @schema.types.values; end |
#root_type_for_operation(op_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.
104 |
# File 'lib/graphql/schema/warden.rb', line 104 def root_type_for_operation(op_name); @schema.root_type_for_operation(op_name); end |
#types ⇒ 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.
rubocop:disable Development/ContextIsPassedCop
103 |
# File 'lib/graphql/schema/warden.rb', line 103 def types; @schema.types; end |
#visible_argument?(arg_defn, _ctx = nil) ⇒ Boolean
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.
94 |
# File 'lib/graphql/schema/warden.rb', line 94 def visible_argument?(arg_defn, _ctx = nil); true; end |
#visible_enum_value?(enum_value, _ctx = nil) ⇒ Boolean
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.
96 |
# File 'lib/graphql/schema/warden.rb', line 96 def visible_enum_value?(enum_value, _ctx = nil); enum_value.visible?(Query::NullContext.instance); end |
#visible_field?(field_defn, _ctx = nil, owner = nil) ⇒ Boolean
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.
93 |
# File 'lib/graphql/schema/warden.rb', line 93 def visible_field?(field_defn, _ctx = nil, owner = nil); true; end |
#visible_type?(type_defn, _ctx = nil) ⇒ Boolean
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.
95 |
# File 'lib/graphql/schema/warden.rb', line 95 def visible_type?(type_defn, _ctx = nil); true; end |
#visible_type_membership?(type_membership, _ctx = nil) ⇒ Boolean
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.
97 |
# File 'lib/graphql/schema/warden.rb', line 97 def visible_type_membership?(type_membership, _ctx = nil); true; end |