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.



225
226
227
228
229
# File 'lib/graphql/schema_comparator/changes.rb', line 225

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



223
224
225
# File 'lib/graphql/schema_comparator/changes.rb', line 223

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



223
224
225
# File 'lib/graphql/schema_comparator/changes.rb', line 223

def directive
  @directive
end

#locationObject (readonly)

Returns the value of attribute location.



223
224
225
# File 'lib/graphql/schema_comparator/changes.rb', line 223

def location
  @location
end

Instance Method Details

#messageObject



231
232
233
# File 'lib/graphql/schema_comparator/changes.rb', line 231

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

#pathObject



235
236
237
# File 'lib/graphql/schema_comparator/changes.rb', line 235

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