Class: GraphQL::SchemaComparator::Changes::TypeDescriptionChanged

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

Returns a new instance of TypeDescriptionChanged


513
514
515
516
517
# File 'lib/graphql/schema_comparator/changes.rb', line 513

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


511
512
513
# File 'lib/graphql/schema_comparator/changes.rb', line 511

def criticality
  @criticality
end

#new_typeObject (readonly)

Returns the value of attribute new_type


511
512
513
# File 'lib/graphql/schema_comparator/changes.rb', line 511

def new_type
  @new_type
end

#old_typeObject (readonly)

Returns the value of attribute old_type


511
512
513
# File 'lib/graphql/schema_comparator/changes.rb', line 511

def old_type
  @old_type
end

Instance Method Details

#messageObject


519
520
521
# File 'lib/graphql/schema_comparator/changes.rb', line 519

def message
  "Description `#{old_type.description}` on type `#{old_type.name}` has changed to `#{new_type.description}`"
end