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 Attribute Summary collapse

Instance Method Summary collapse

Methods included from Define::InstanceDefinable

#define, #deprecated_define, #initialize_copy, #metadata, #redefine

Instance Attribute Details

#ast_nodeObject



77
78
79
# File 'lib/graphql/enum_type.rb', line 77

def ast_node
  @ast_node
end

Instance Method Details

#graphql_nameObject



87
88
89
# File 'lib/graphql/enum_type.rb', line 87

def graphql_name
  name
end

#name=(new_name) ⇒ Object



81
82
83
84
85
# File 'lib/graphql/enum_type.rb', line 81

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

#type_classObject



91
92
93
# File 'lib/graphql/enum_type.rb', line 91

def type_class
  [:type_class]
end