Class: GraphQL::SchemaComparator::Changes::UnionMemberRemoved

Inherits:
AbstractChange
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(union_type, union_member) ⇒ UnionMemberRemoved



116
117
118
119
120
# File 'lib/graphql/schema_comparator/changes.rb', line 116

def initialize(union_type, union_member)
  @union_member = union_member
  @union_type = union_type
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



114
115
116
# File 'lib/graphql/schema_comparator/changes.rb', line 114

def criticality
  @criticality
end

#union_memberObject (readonly)

Returns the value of attribute union_member.



114
115
116
# File 'lib/graphql/schema_comparator/changes.rb', line 114

def union_member
  @union_member
end

#union_typeObject (readonly)

Returns the value of attribute union_type.



114
115
116
# File 'lib/graphql/schema_comparator/changes.rb', line 114

def union_type
  @union_type
end

Instance Method Details

#messageObject



122
123
124
# File 'lib/graphql/schema_comparator/changes.rb', line 122

def message
  "Union member `#{union_member.name}` was removed from Union type `#{union_type.name}`"
end

#pathObject



126
127
128
# File 'lib/graphql/schema_comparator/changes.rb', line 126

def path
  union_type.name
end