Class: GraphQL::SchemaComparator::Changes::InputFieldAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::InputFieldAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#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
- #breaking? ⇒ Boolean
-
#initialize(input_object_type, field) ⇒ InputFieldAdded
constructor
A new instance of InputFieldAdded.
- #message ⇒ Object
Constructor Details
#initialize(input_object_type, field) ⇒ InputFieldAdded
Returns a new instance of InputFieldAdded.
711 712 713 714 715 |
# File 'lib/graphql/schema_comparator/changes.rb', line 711 def initialize(input_object_type, field) @input_object_type = input_object_type @field = field @breaking = field.type.kind.non_null? ? true : false end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
709 710 711 |
# File 'lib/graphql/schema_comparator/changes.rb', line 709 def field @field end |
#input_object_type ⇒ Object (readonly)
Returns the value of attribute input_object_type.
709 710 711 |
# File 'lib/graphql/schema_comparator/changes.rb', line 709 def input_object_type @input_object_type end |
Instance Method Details
#breaking? ⇒ Boolean
721 722 723 |
# File 'lib/graphql/schema_comparator/changes.rb', line 721 def breaking? !!@breaking end |
#message ⇒ Object
717 718 719 |
# File 'lib/graphql/schema_comparator/changes.rb', line 717 def "Input field `#{field.name}` was added to input object type `#{input_object_type.name}`" end |