Method: GraphQL::Schema::Member::HasArguments#arguments
- Defined in:
- lib/graphql/schema/member/has_arguments.rb
#arguments(context = GraphQL::Query::NullContext.instance, _require_defined_arguments = nil) ⇒ Hash<String => GraphQL::Schema::Argument] Arguments defined on this thing, keyed by name. Includes inherited definitions
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 Hash
102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 102 def arguments(context = GraphQL::Query::NullContext.instance, _require_defined_arguments = nil) if !own_arguments.empty? own_arguments_that_apply = {} own_arguments.each do |name, args_entry| if (visible_defn = Warden.visible_entry?(:visible_argument?, args_entry, context)) own_arguments_that_apply[visible_defn.graphql_name] = visible_defn end end end # might be nil if there are actually no arguments own_arguments_that_apply || own_arguments end |