Class: GraphQL::SchemaComparator::Changes::UnionMemberAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::UnionMemberAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#union_member ⇒ Object
readonly
Returns the value of attribute union_member.
-
#union_type ⇒ Object
readonly
Returns the value of attribute union_type.
Instance Method Summary collapse
-
#initialize(union_type, union_member) ⇒ UnionMemberAdded
constructor
A new instance of UnionMemberAdded.
- #message ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(union_type, union_member) ⇒ UnionMemberAdded
Returns a new instance of UnionMemberAdded.
416 417 418 419 420 421 422 423 |
# File 'lib/graphql/schema_comparator/changes.rb', line 416 def initialize(union_type, union_member) @union_member = union_member @union_type = union_type @criticality = Changes::Criticality.dangerous( reason: "Adding a possible type to Unions may break existing clients " \ "that were not programming defensively against a new possible type." ) end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
414 415 416 |
# File 'lib/graphql/schema_comparator/changes.rb', line 414 def criticality @criticality end |
#union_member ⇒ Object (readonly)
Returns the value of attribute union_member.
414 415 416 |
# File 'lib/graphql/schema_comparator/changes.rb', line 414 def union_member @union_member end |
#union_type ⇒ Object (readonly)
Returns the value of attribute union_type.
414 415 416 |
# File 'lib/graphql/schema_comparator/changes.rb', line 414 def union_type @union_type end |
Instance Method Details
#message ⇒ Object
425 426 427 |
# File 'lib/graphql/schema_comparator/changes.rb', line 425 def "Union member `#{union_member.name}` was added to Union type `#{union_type.name}`" end |