Sha256: e8a025d2ee48c32a9e9396e9226e599843350873dd67ba2d0481ca36eba0d037

Contents?: true

Size: 742 Bytes

Versions: 2

Compression:

Stored size: 742 Bytes

Contents

# Used for defined arguments ({Field}, {InputObjectType})
#
# {#name} must be a String.
#
# @example defining an argument for a field
#   GraphQL::Field.define do
#     # ...
#     argument :favoriteFood, types.String, "Favorite thing to eat", default_value: "pizza"
#   end
#
# @example defining an input field for an {InputObjectType}
#   GraphQL::InputObjectType.define do
#     input_field :newName, !types.String
#   end
#
class GraphQL::Argument
  include GraphQL::Define::InstanceDefinable
  accepts_definitions :name, :type, :description, :default_value
  attr_accessor :type, :description, :default_value

  # @return [String] The name of this argument on its {GraphQL::Field} or {GraphQL::InputObjectType}
  attr_accessor :name
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
graphql-0.12.1 lib/graphql/argument.rb
graphql-0.12.0 lib/graphql/argument.rb