Class: GraphQL::SchemaComparator::Changes::InputFieldAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::InputFieldAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Overview
Mostly Non-Breaking Changes
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#input_object_type ⇒ Object
readonly
Returns the value of attribute input_object_type.
Instance Method Summary collapse
-
#initialize(input_object_type, field) ⇒ InputFieldAdded
constructor
A new instance of InputFieldAdded.
- #message ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(input_object_type, field) ⇒ InputFieldAdded
Returns a new instance of InputFieldAdded.
452 453 454 455 456 457 458 459 460 461 |
# File 'lib/graphql/schema_comparator/changes.rb', line 452 def initialize(input_object_type, field) @criticality = if field.type.non_null? Changes::Criticality.breaking else Changes::Criticality.non_breaking end @input_object_type = input_object_type @field = field end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
450 451 452 |
# File 'lib/graphql/schema_comparator/changes.rb', line 450 def criticality @criticality end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
450 451 452 |
# File 'lib/graphql/schema_comparator/changes.rb', line 450 def field @field end |
#input_object_type ⇒ Object (readonly)
Returns the value of attribute input_object_type.
450 451 452 |
# File 'lib/graphql/schema_comparator/changes.rb', line 450 def input_object_type @input_object_type end |
Instance Method Details
#message ⇒ Object
463 464 465 |
# File 'lib/graphql/schema_comparator/changes.rb', line 463 def "Input field `#{field.name}` was added to input object type `#{input_object_type.name}`" end |