Class: GraphQL::SchemaComparator::Changes::FieldDeprecationChanged

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, old_field, new_field) ⇒ FieldDeprecationChanged

Returns a new instance of FieldDeprecationChanged.



290
291
292
293
294
295
# File 'lib/graphql/schema_comparator/changes.rb', line 290

def initialize(type, old_field, new_field)
  @type = type
  @old_field = old_field
  @new_field = new_field
  @breaking = false
end

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



288
289
290
# File 'lib/graphql/schema_comparator/changes.rb', line 288

def breaking
  @breaking
end

#new_fieldObject (readonly)

Returns the value of attribute new_field.



288
289
290
# File 'lib/graphql/schema_comparator/changes.rb', line 288

def new_field
  @new_field
end

#old_fieldObject (readonly)

Returns the value of attribute old_field.



288
289
290
# File 'lib/graphql/schema_comparator/changes.rb', line 288

def old_field
  @old_field
end

#typeObject (readonly)

Returns the value of attribute type.



288
289
290
# File 'lib/graphql/schema_comparator/changes.rb', line 288

def type
  @type
end

Instance Method Details

#messageObject



297
298
299
300
# File 'lib/graphql/schema_comparator/changes.rb', line 297

def message
  "Deprecation reason on field `#{type.name}.#{new_field.name}` has changed "\
    "from `#{old_field.deprecation_reason}` to `#{new_field.deprecation_reason}`"
end