Class: GraphQL::SchemaComparator::Changes::InputFieldDefaultChanged
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::InputFieldDefaultChanged
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#input_type ⇒ Object
readonly
Returns the value of attribute input_type.
-
#new_field ⇒ Object
readonly
Returns the value of attribute new_field.
-
#old_field ⇒ Object
readonly
Returns the value of attribute old_field.
Instance Method Summary collapse
-
#initialize(input_type, old_field, new_field) ⇒ InputFieldDefaultChanged
constructor
A new instance of InputFieldDefaultChanged.
- #message ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(input_type, old_field, new_field) ⇒ InputFieldDefaultChanged
Returns a new instance of InputFieldDefaultChanged.
361 362 363 364 365 366 367 368 369 |
# File 'lib/graphql/schema_comparator/changes.rb', line 361 def initialize(input_type, old_field, new_field) @criticality = Changes::Criticality.dangerous( reason: "Changing the default value for an argument may change the runtime " \ "behaviour of a field if it was never provided." ) @input_type = input_type @old_field = old_field @new_field = new_field end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
359 360 361 |
# File 'lib/graphql/schema_comparator/changes.rb', line 359 def criticality @criticality end |
#input_type ⇒ Object (readonly)
Returns the value of attribute input_type.
359 360 361 |
# File 'lib/graphql/schema_comparator/changes.rb', line 359 def input_type @input_type end |
#new_field ⇒ Object (readonly)
Returns the value of attribute new_field.
359 360 361 |
# File 'lib/graphql/schema_comparator/changes.rb', line 359 def new_field @new_field end |
#old_field ⇒ Object (readonly)
Returns the value of attribute old_field.
359 360 361 |
# File 'lib/graphql/schema_comparator/changes.rb', line 359 def old_field @old_field end |
Instance Method Details
#message ⇒ Object
371 372 373 374 |
# File 'lib/graphql/schema_comparator/changes.rb', line 371 def "Input field `#{input_type.name}.#{old_field.name}` default changed"\ " from `#{old_field.default_value}` to `#{new_field.default_value}`" end |