class GraphQL::SchemaComparator::Changes::EnumValueRemoved

Attributes

criticality[R]
enum_type[R]
enum_value[R]

Public Class Methods

new(enum_type, enum_value) click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 102
def initialize(enum_type, enum_value)
  @enum_value = enum_value
  @enum_type = enum_type
  @criticality = Changes::Criticality.breaking(
    reason: "Removing an enum value will cause existing queries that use this enum value to error."
  )
end

Public Instance Methods

message() click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 110
def message
  "Enum value `#{enum_value.graphql_name}` was removed from enum `#{enum_type.graphql_definition}`"
end
path() click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 114
def path
  [enum_type.graphql_definition, enum_value.graphql_name].join('.')
end