Class: GraphQL::SchemaComparator::Changes::UnionMemberAdded

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) ⇒ UnionMemberAdded

Returns a new instance of UnionMemberAdded.



314
315
316
317
318
# File 'lib/graphql/schema_comparator/changes.rb', line 314

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

Instance Attribute Details

#union_memberObject (readonly)

Returns the value of attribute union_member.



312
313
314
# File 'lib/graphql/schema_comparator/changes.rb', line 312

def union_member
  @union_member
end

#union_typeObject (readonly)

Returns the value of attribute union_type.



312
313
314
# File 'lib/graphql/schema_comparator/changes.rb', line 312

def union_type
  @union_type
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


324
325
326
# File 'lib/graphql/schema_comparator/changes.rb', line 324

def breaking?
  !!@breaking
end

#messageObject



320
321
322
# File 'lib/graphql/schema_comparator/changes.rb', line 320

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