Class: GraphQL::SchemaComparator::Changes::TypeAdded

Inherits:
AbstractChange 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(type) ⇒ TypeAdded

Returns a new instance of TypeAdded


487
488
489
490
# File 'lib/graphql/schema_comparator/changes.rb', line 487

def initialize(type)
  @type = type
  @criticality = Changes::Criticality.non_breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality


485
486
487
# File 'lib/graphql/schema_comparator/changes.rb', line 485

def criticality
  @criticality
end

#typeObject (readonly)

Returns the value of attribute type


485
486
487
# File 'lib/graphql/schema_comparator/changes.rb', line 485

def type
  @type
end

Instance Method Details

#messageObject


492
493
494
# File 'lib/graphql/schema_comparator/changes.rb', line 492

def message
  "Type `#{type.name}` was added"
end