Module: GraphQL::Schema::Member::HasArguments::ClassConfigured::InheritedArguments Private
- Defined in:
- lib/graphql/schema/member/has_arguments.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
-
#all_argument_definitions ⇒ Object
private
-
#any_arguments? ⇒ Boolean
private
-
#arguments(context = GraphQL::Query::NullContext.instance) ⇒ Object
private
-
#get_argument(argument_name, context = GraphQL::Query::NullContext.instance) ⇒ Object
private
Instance Method Details
#all_argument_definitions ⇒ 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.
156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 156 def all_argument_definitions all_defns = {} ancestors.reverse_each do |ancestor| if ancestor.respond_to?(:own_arguments) all_defns.merge!(ancestor.own_arguments) end end all_defns = all_defns.values all_defns.flatten! all_defns end |
#any_arguments? ⇒ 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.
152 153 154 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 152 def any_arguments? super || superclass.any_arguments? end |
#arguments(context = GraphQL::Query::NullContext.instance) ⇒ 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.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 136 def arguments(context = GraphQL::Query::NullContext.instance) own_arguments = super inherited_arguments = superclass.arguments(context) if own_arguments.any? if inherited_arguments.any? # Local definitions override inherited ones inherited_arguments.merge(own_arguments) else own_arguments end else inherited_arguments end end |
#get_argument(argument_name, context = GraphQL::Query::NullContext.instance) ⇒ 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.
169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 169 def get_argument(argument_name, context = GraphQL::Query::NullContext.instance) warden = Warden.from_context(context) for ancestor in ancestors if ancestor.respond_to?(:own_arguments) && (a = ancestor.own_arguments[argument_name]) && (a = Warden.visible_entry?(:visible_argument?, a, context, warden)) return a end end nil end |