Class: GraphQL::SchemaComparator::Changes::FieldDeprecationChanged
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::FieldDeprecationChanged
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#new_field ⇒ Object
readonly
Returns the value of attribute new_field.
-
#old_field ⇒ Object
readonly
Returns the value of attribute old_field.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, old_field, new_field) ⇒ FieldDeprecationChanged
constructor
A new instance of FieldDeprecationChanged.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(type, old_field, new_field) ⇒ FieldDeprecationChanged
Returns a new instance of FieldDeprecationChanged.
797 798 799 800 801 802 |
# File 'lib/graphql/schema_comparator/changes.rb', line 797 def initialize(type, old_field, new_field) @criticality = Changes::Criticality.non_breaking @type = type @old_field = old_field @new_field = new_field end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
795 796 797 |
# File 'lib/graphql/schema_comparator/changes.rb', line 795 def criticality @criticality end |
#new_field ⇒ Object (readonly)
Returns the value of attribute new_field.
795 796 797 |
# File 'lib/graphql/schema_comparator/changes.rb', line 795 def new_field @new_field end |
#old_field ⇒ Object (readonly)
Returns the value of attribute old_field.
795 796 797 |
# File 'lib/graphql/schema_comparator/changes.rb', line 795 def old_field @old_field end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
795 796 797 |
# File 'lib/graphql/schema_comparator/changes.rb', line 795 def type @type end |
Instance Method Details
#message ⇒ Object
804 805 806 807 |
# File 'lib/graphql/schema_comparator/changes.rb', line 804 def "Deprecation reason on field `#{type.name}.#{new_field.name}` has changed "\ "from `#{old_field.deprecation_reason}` to `#{new_field.deprecation_reason}`" end |
#path ⇒ Object
809 810 811 |
# File 'lib/graphql/schema_comparator/changes.rb', line 809 def path [type.name, old_field.name].join(".") end |