Class: GraphQL::Query::Arguments::ArgumentValue

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/query/arguments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value, definition, default_used) ⇒ ArgumentValue

Returns a new instance of ArgumentValue


110
111
112
113
114
115
# File 'lib/graphql/query/arguments.rb', line 110

def initialize(key, value, definition, default_used)
  @key = key
  @value = value
  @definition = definition
  @default_used = default_used
end

Instance Attribute Details

#default_used=(value) ⇒ Object (writeonly)

Sets the attribute default_used

Parameters:

  • value

    the value to set the attribute default_used to.


108
109
110
# File 'lib/graphql/query/arguments.rb', line 108

def default_used=(value)
  @default_used = value
end

#definitionObject (readonly)

Returns the value of attribute definition


107
108
109
# File 'lib/graphql/query/arguments.rb', line 107

def definition
  @definition
end

#keyObject (readonly)

Returns the value of attribute key


107
108
109
# File 'lib/graphql/query/arguments.rb', line 107

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value


107
108
109
# File 'lib/graphql/query/arguments.rb', line 107

def value
  @value
end

Instance Method Details

#default_used?Boolean

Returns true if the argument default was passed as the argument value to the resolver

Returns:

  • (Boolean)

    true if the argument default was passed as the argument value to the resolver


118
119
120
# File 'lib/graphql/query/arguments.rb', line 118

def default_used?
  @default_used
end