Class: GraphQLSchema::InputValue

Inherits:
Object
  • Object
show all
Includes:
NamedHash
Defined in:
lib/graphql_schema.rb

Instance Method Summary collapse

Methods included from NamedHash

#camelize_name, #classify_name, #description, #name, #to_h, #upcase_name

Constructor Details

#initialize(arg_hash) ⇒ InputValue

Returns a new instance of InputValue.



92
93
94
# File 'lib/graphql_schema.rb', line 92

def initialize(arg_hash)
  @hash = arg_hash
end

Instance Method Details

#default_valueObject



100
101
102
# File 'lib/graphql_schema.rb', line 100

def default_value
  @default_value ||= @hash.fetch('defaultValue')
end

#typeObject



96
97
98
# File 'lib/graphql_schema.rb', line 96

def type
  @type ||= TypeDeclaration.new(@hash.fetch('type'))
end