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 collapse

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

Instance Method Summary collapse

Methods included from Define::InstanceDefinable

#define, #initialize_copy, #metadata, #redefine

Instance Method Details

#name=(new_name) ⇒ Object


142
143
144
145
146
# File 'lib/graphql/enum_type.rb', line 142

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