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

Constructor Details

#initialize(object_type, field) ⇒ FieldRemoved

Returns a new instance of FieldRemoved.



178
179
180
181
182
# File 'lib/graphql/schema_comparator/changes.rb', line 178

def initialize(object_type, field)
  @object_type = object_type
  @field = field
  @breaking = true
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



176
177
178
# File 'lib/graphql/schema_comparator/changes.rb', line 176

def field
  @field
end

#object_typeObject (readonly)

Returns the value of attribute object_type.



176
177
178
# File 'lib/graphql/schema_comparator/changes.rb', line 176

def object_type
  @object_type
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


188
189
190
# File 'lib/graphql/schema_comparator/changes.rb', line 188

def breaking?
  !!@breaking
end

#messageObject



184
185
186
# File 'lib/graphql/schema_comparator/changes.rb', line 184

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