Class: GraphQL::SchemaComparator::Changes::FieldRemoved

Inherits:
AbstractChange
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(object_type, field) ⇒ FieldRemoved

Returns a new instance of FieldRemoved


166
167
168
169
170
# File 'lib/graphql/schema_comparator/changes.rb', line 166

def initialize(object_type, field)
  @object_type = object_type
  @field = field
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


164
165
166
# File 'lib/graphql/schema_comparator/changes.rb', line 164

def criticality
  @criticality
end

#fieldObject (readonly)

Returns the value of attribute field


164
165
166
# File 'lib/graphql/schema_comparator/changes.rb', line 164

def field
  @field
end

#object_typeObject (readonly)

Returns the value of attribute object_type


164
165
166
# File 'lib/graphql/schema_comparator/changes.rb', line 164

def object_type
  @object_type
end

Instance Method Details

#messageObject


172
173
174
# File 'lib/graphql/schema_comparator/changes.rb', line 172

def message
  "Field `#{field.name}` was removed from object type `#{object_type.name}`"
end