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.



680
681
682
683
# File 'lib/graphql/schema_comparator/changes.rb', line 680

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



678
679
680
# File 'lib/graphql/schema_comparator/changes.rb', line 678

def criticality
  @criticality
end

#typeObject (readonly)

Returns the value of attribute type.



678
679
680
# File 'lib/graphql/schema_comparator/changes.rb', line 678

def type
  @type
end

Instance Method Details

#messageObject



685
686
687
# File 'lib/graphql/schema_comparator/changes.rb', line 685

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

#pathObject



689
690
691
# File 'lib/graphql/schema_comparator/changes.rb', line 689

def path
  type.path
end