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
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(union_type, union_member) ⇒ UnionMemberAdded
Returns a new instance of UnionMemberAdded.
589 590 591 592 593 594 595 596 |
# File 'lib/graphql/schema_comparator/changes.rb', line 589 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.
587 588 589 |
# File 'lib/graphql/schema_comparator/changes.rb', line 587 def criticality @criticality end |
#union_member ⇒ Object (readonly)
Returns the value of attribute union_member.
587 588 589 |
# File 'lib/graphql/schema_comparator/changes.rb', line 587 def union_member @union_member end |
#union_type ⇒ Object (readonly)
Returns the value of attribute union_type.
587 588 589 |
# File 'lib/graphql/schema_comparator/changes.rb', line 587 def union_type @union_type end |
Instance Method Details
#message ⇒ Object
598 599 600 |
# File 'lib/graphql/schema_comparator/changes.rb', line 598 def "Union member `#{union_member.graphql_name}` was added to Union type `#{union_type.graphql_name}`" end |
#path ⇒ Object
602 603 604 |
# File 'lib/graphql/schema_comparator/changes.rb', line 602 def path union_type.path end |