Method: GraphQL::Schema::Member::HasArguments#get_argument
- Defined in:
- lib/graphql/schema/member/has_arguments.rb
#get_argument(argument_name, context = GraphQL::Query::NullContext.instance) ⇒ GraphQL::Schema::Argument?
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 Argument defined on this thing, fetched by name.
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 234 def get_argument(argument_name, context = GraphQL::Query::NullContext.instance) warden = Warden.from_context(context) if (arg_config = own_arguments[argument_name]) && ((context.respond_to?(:types) && context.types.is_a?(GraphQL::Schema::Visibility::Profile)) || (visible_arg = Warden.visible_entry?(:visible_argument?, arg_config, context, warden))) visible_arg || arg_config elsif defined?(@resolver_class) && @resolver_class @resolver_class.get_field_argument(argument_name, context) else nil end end |