Class: GraphQL::SchemaComparator::Changes::TypeKindChanged

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(old_type, new_type) ⇒ TypeKindChanged

Returns a new instance of TypeKindChanged


67
68
69
70
71
# File 'lib/graphql/schema_comparator/changes.rb', line 67

def initialize(old_type, new_type)
  @old_type = old_type
  @new_type = new_type
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


65
66
67
# File 'lib/graphql/schema_comparator/changes.rb', line 65

def criticality
  @criticality
end

#new_typeObject (readonly)

Returns the value of attribute new_type


65
66
67
# File 'lib/graphql/schema_comparator/changes.rb', line 65

def new_type
  @new_type
end

#old_typeObject (readonly)

Returns the value of attribute old_type


65
66
67
# File 'lib/graphql/schema_comparator/changes.rb', line 65

def old_type
  @old_type
end

Instance Method Details

#messageObject


73
74
75
# File 'lib/graphql/schema_comparator/changes.rb', line 73

def message
  "`#{old_type.name}` kind changed from `#{old_type.kind}` to `#{new_type.kind}`"
end