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.



714
715
716
717
718
# File 'lib/graphql/schema_comparator/changes.rb', line 714

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.



712
713
714
# File 'lib/graphql/schema_comparator/changes.rb', line 712

def criticality
  @criticality
end

#new_typeObject (readonly)

Returns the value of attribute new_type.



712
713
714
# File 'lib/graphql/schema_comparator/changes.rb', line 712

def new_type
  @new_type
end

#old_typeObject (readonly)

Returns the value of attribute old_type.



712
713
714
# File 'lib/graphql/schema_comparator/changes.rb', line 712

def old_type
  @old_type
end

Instance Method Details

#messageObject



720
721
722
# File 'lib/graphql/schema_comparator/changes.rb', line 720

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

#pathObject



724
725
726
# File 'lib/graphql/schema_comparator/changes.rb', line 724

def path
  old_type.path
end