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



207
208
209
210
211
# File 'lib/graphql/schema_comparator/changes.rb', line 207

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.



205
206
207
# File 'lib/graphql/schema_comparator/changes.rb', line 205

def criticality
  @criticality
end

#fieldObject (readonly)

Returns the value of attribute field.



205
206
207
# File 'lib/graphql/schema_comparator/changes.rb', line 205

def field
  @field
end

#object_typeObject (readonly)

Returns the value of attribute object_type.



205
206
207
# File 'lib/graphql/schema_comparator/changes.rb', line 205

def object_type
  @object_type
end

Instance Method Details

#messageObject



213
214
215
# File 'lib/graphql/schema_comparator/changes.rb', line 213

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

#pathObject



217
218
219
# File 'lib/graphql/schema_comparator/changes.rb', line 217

def path
  [object_type.name, field.name].join('.')
end