Method: GraphQL::Schema::Warden#arguments

Defined in:
lib/graphql/schema/warden.rb

#arguments(argument_owner, ctx = nil) ⇒ Array<GraphQL::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 Visible arguments on argument_owner.

Parameters:

  • argument_owner (GraphQL::Field, GraphQL::InputObjectType)

Returns:

  • (Array<GraphQL::Argument>)

    Visible arguments on argument_owner



318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/graphql/schema/warden.rb', line 318

def arguments(argument_owner, ctx = nil)
  @visible_arguments ||= read_through { |o|
    args = o.arguments(@context)
    if !args.empty?
      args = args.values
      args.select! { |a| visible_argument?(a, @context) }
      args
    else
      EmptyObjects::EMPTY_ARRAY
    end
  }
  @visible_arguments[argument_owner]
end