Class: GraphQL::SchemaComparator::Changes::FieldAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::FieldAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#object_type ⇒ Object
readonly
Returns the value of attribute object_type.
Instance Method Summary collapse
- #breaking? ⇒ Boolean
-
#initialize(object_type, field) ⇒ FieldAdded
constructor
A new instance of FieldAdded.
- #message ⇒ Object
Constructor Details
#initialize(object_type, field) ⇒ FieldAdded
Returns a new instance of FieldAdded.
531 532 533 534 535 |
# File 'lib/graphql/schema_comparator/changes.rb', line 531 def initialize(object_type, field) @object_type = object_type @field = field @breaking = false end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
529 530 531 |
# File 'lib/graphql/schema_comparator/changes.rb', line 529 def field @field end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
529 530 531 |
# File 'lib/graphql/schema_comparator/changes.rb', line 529 def object_type @object_type end |
Instance Method Details
#breaking? ⇒ Boolean
541 542 543 |
# File 'lib/graphql/schema_comparator/changes.rb', line 541 def breaking? !!@breaking end |
#message ⇒ Object
537 538 539 |
# File 'lib/graphql/schema_comparator/changes.rb', line 537 def "Field `#{field.name}` was added to object type `#{object_type.name}`" end |