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
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#object_type ⇒ Object
readonly
Returns the value of attribute object_type.
Instance Method Summary collapse
-
#initialize(object_type, field) ⇒ FieldAdded
constructor
A new instance of FieldAdded.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(object_type, field) ⇒ FieldAdded
Returns a new instance of FieldAdded.
817 818 819 820 821 |
# File 'lib/graphql/schema_comparator/changes.rb', line 817 def initialize(object_type, field) @criticality = Changes::Criticality.non_breaking @object_type = object_type @field = field end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
815 816 817 |
# File 'lib/graphql/schema_comparator/changes.rb', line 815 def criticality @criticality end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
815 816 817 |
# File 'lib/graphql/schema_comparator/changes.rb', line 815 def field @field end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
815 816 817 |
# File 'lib/graphql/schema_comparator/changes.rb', line 815 def object_type @object_type end |
Instance Method Details
#message ⇒ Object
823 824 825 |
# File 'lib/graphql/schema_comparator/changes.rb', line 823 def "Field `#{field.name}` was added to object type `#{object_type.name}`" end |
#path ⇒ Object
827 828 829 |
# File 'lib/graphql/schema_comparator/changes.rb', line 827 def path [object_type.name, field.name].join(".") end |