class GraphQL::Argument


end
argument :newName, !types.String
GraphQL::InputObjectType.define do
@example defining an argument for an {InputObjectType}
end
argument :favoriteFood, types.String, “Favorite thing to eat”, default_value: “pizza”
# …
GraphQL::Field.define do
@example defining an argument for a field
{#name} must be a String.
Used for defined arguments ({Field}, {InputObjectType})

def type

Returns:
  • (GraphQL::BaseType) - the input type for this argument
def type
  @clean_type ||= begin
    ensure_defined
    GraphQL::BaseType.resolve_related_type(@dirty_type)
  end
end

def type=(new_input_type)

Parameters:
  • new_input_type (GraphQL::BaseType, Proc) -- Assign a new input type for this argument (if it's a proc, it will be called after schema initialization)
def type=(new_input_type)
  ensure_defined
  @clean_type = nil
  @dirty_type = new_input_type
end