class GraphQL::SchemaComparator::Changes::UnionMemberRemoved

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 122
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

Public Instance Methods

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