Class: GraphQL::SchemaComparator::Changes::FieldArgumentAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::FieldArgumentAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, field, argument) ⇒ FieldArgumentAdded
constructor
A new instance of FieldArgumentAdded.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(type, field, argument) ⇒ FieldArgumentAdded
Returns a new instance of FieldArgumentAdded.
576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/graphql/schema_comparator/changes.rb', line 576 def initialize(type, field, argument) @criticality = if argument.type.non_null? Changes::Criticality.breaking else Changes::Criticality.non_breaking end @type = type @field = field @argument = argument end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
574 575 576 |
# File 'lib/graphql/schema_comparator/changes.rb', line 574 def argument @argument end |
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
574 575 576 |
# File 'lib/graphql/schema_comparator/changes.rb', line 574 def criticality @criticality end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
574 575 576 |
# File 'lib/graphql/schema_comparator/changes.rb', line 574 def field @field end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
574 575 576 |
# File 'lib/graphql/schema_comparator/changes.rb', line 574 def type @type end |
Instance Method Details
#message ⇒ Object
588 589 590 |
# File 'lib/graphql/schema_comparator/changes.rb', line 588 def "Argument `#{argument.name}: #{argument.type}` added to field `#{type.name}.#{field.name}`" end |
#path ⇒ Object
592 593 594 |
# File 'lib/graphql/schema_comparator/changes.rb', line 592 def path [type.name, field.name, argument.name].join(".") end |