Class: GraphQL::SchemaComparator::Changes::UnionMemberRemoved
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::UnionMemberRemoved
- 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) ⇒ UnionMemberRemoved
constructor
A new instance of UnionMemberRemoved.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(union_type, union_member) ⇒ UnionMemberRemoved
Returns a new instance of UnionMemberRemoved.
128 129 130 131 132 133 134 |
# File 'lib/graphql/schema_comparator/changes.rb', line 128 def initialize(union_type, union_member) @union_member = union_member @union_type = union_type @criticality = Changes::Criticality.breaking( reason: "Removing a union member from a union can cause existing queries that use this union member in a fragment spread to error." ) end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
126 127 128 |
# File 'lib/graphql/schema_comparator/changes.rb', line 126 def criticality @criticality end |
#union_member ⇒ Object (readonly)
Returns the value of attribute union_member.
126 127 128 |
# File 'lib/graphql/schema_comparator/changes.rb', line 126 def union_member @union_member end |
#union_type ⇒ Object (readonly)
Returns the value of attribute union_type.
126 127 128 |
# File 'lib/graphql/schema_comparator/changes.rb', line 126 def union_type @union_type end |
Instance Method Details
#message ⇒ Object
136 137 138 |
# File 'lib/graphql/schema_comparator/changes.rb', line 136 def "Union member `#{union_member.graphql_name}` was removed from Union type `#{union_type.graphql_name}`" end |
#path ⇒ Object
140 141 142 |
# File 'lib/graphql/schema_comparator/changes.rb', line 140 def path union_type.path end |