class GraphQL::SchemaComparator::Changes::UnionMemberAdded

Attributes

criticality[R]
union_member[R]
union_type[R]

Public Class Methods

new(union_type, union_member) click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 537
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

Public Instance Methods

message() click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 546
def message
  "Union member `#{union_member.graphql_name}` was added to Union type `#{union_type.graphql_definition}`"
end
path() click to toggle source
# File lib/graphql/schema_comparator/changes.rb, line 550
def path
  union_type.graphql_definition.to_s
end