Class: GraphQL::Argument
- Inherits:
-
Object
- Object
- GraphQL::Argument
- Includes:
- Define::InstanceDefinable
- Defined in:
- lib/graphql/argument.rb
Overview
Used for defined arguments (Field, InputObjectType)
#name must be a String.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of this argument on its Field or InputObjectType.
Instance Method Summary collapse
-
#type ⇒ Object
Get the return type for this field.
- #type=(new_return_type) ⇒ Object
Methods included from Define::InstanceDefinable
#definition_proc=, included, #metadata
Instance Attribute Details
#name ⇒ String
Returns The name of this argument on its Field or InputObjectType.
23 24 25 26 |
# File 'lib/graphql/argument.rb', line 23 def name ensure_defined @name end |
Instance Method Details
#type ⇒ Object
Get the return type for this field.
37 38 39 40 41 42 |
# File 'lib/graphql/argument.rb', line 37 def type @clean_type ||= begin ensure_defined GraphQL::BaseType.(@dirty_type) end end |
#type=(new_return_type) ⇒ Object
30 31 32 33 34 |
# File 'lib/graphql/argument.rb', line 30 def type=(new_return_type) ensure_defined @clean_type = nil @dirty_type = new_return_type end |