Class: GraphQL::SchemaComparator::Changes::DirectiveLocationRemoved

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

Returns a new instance of DirectiveLocationRemoved.



325
326
327
328
329
# File 'lib/graphql/schema_comparator/changes.rb', line 325

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



323
324
325
# File 'lib/graphql/schema_comparator/changes.rb', line 323

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



323
324
325
# File 'lib/graphql/schema_comparator/changes.rb', line 323

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



323
324
325
# File 'lib/graphql/schema_comparator/changes.rb', line 323

def location
  @location
end

Instance Method Details

#messageObject



331
332
333
# File 'lib/graphql/schema_comparator/changes.rb', line 331

def message
  "Location `#{location}` was removed from directive `#{directive.graphql_name}`"
end

#pathObject



335
336
337
# File 'lib/graphql/schema_comparator/changes.rb', line 335

def path
  "@#{directive.graphql_name}"
end