Class: GraphQL::SchemaComparator::Changes::DirectiveLocationAdded

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(directive, location) ⇒ DirectiveLocationAdded

Returns a new instance of DirectiveLocationAdded.



675
676
677
678
679
# File 'lib/graphql/schema_comparator/changes.rb', line 675

def initialize(directive, location)
  @criticality = Changes::Criticality.non_breaking
  @directive = directive
  @location = location
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



673
674
675
# File 'lib/graphql/schema_comparator/changes.rb', line 673

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



673
674
675
# File 'lib/graphql/schema_comparator/changes.rb', line 673

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



673
674
675
# File 'lib/graphql/schema_comparator/changes.rb', line 673

def location
  @location
end

Instance Method Details

#messageObject



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

def message
  "Location `#{location}` was added to directive `#{directive.name}`"
end