Class: GraphQL::EnumType::EnumValue

Inherits:
Object
  • Object
show all
Includes:
Define::InstanceDefinable
Defined in:
lib/graphql/enum_type.rb

Overview

A value within an GraphQL::EnumType

Created with the value helper

Constant Summary

ATTRIBUTES =
[:name, :description, :deprecation_reason, :value]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Define::InstanceDefinable

#define, #initialize_copy, #metadata, #redefine

Instance Attribute Details

#ast_nodeObject

Returns the value of attribute ast_node



141
142
143
# File 'lib/graphql/enum_type.rb', line 141

def ast_node
  @ast_node
end

Instance Method Details

#name=(new_name) ⇒ Object



144
145
146
147
148
# File 'lib/graphql/enum_type.rb', line 144

def name=(new_name)
  # Validate that the name is correct
  GraphQL::NameValidator.validate!(new_name)
  @name = new_name
end