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

Constructor Details

#initialize(union_type, union_member) ⇒ UnionMemberRemoved

Returns a new instance of UnionMemberRemoved.



87
88
89
90
91
# File 'lib/graphql/schema_comparator/changes.rb', line 87

def initialize(union_type, union_member)
  @union_member = union_member
  @union_type = union_type
  @breaking = true
end

Instance Attribute Details

#union_memberObject (readonly)

Returns the value of attribute union_member.



85
86
87
# File 'lib/graphql/schema_comparator/changes.rb', line 85

def union_member
  @union_member
end

#union_typeObject (readonly)

Returns the value of attribute union_type.



85
86
87
# File 'lib/graphql/schema_comparator/changes.rb', line 85

def union_type
  @union_type
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/graphql/schema_comparator/changes.rb', line 97

def breaking?
  !!@breaking
end

#messageObject



93
94
95
# File 'lib/graphql/schema_comparator/changes.rb', line 93

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