Class: GraphQL::SchemaComparator::Changes::DirectiveArgumentRemoved

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, argument) ⇒ DirectiveArgumentRemoved

Returns a new instance of DirectiveArgumentRemoved.



189
190
191
192
193
# File 'lib/graphql/schema_comparator/changes.rb', line 189

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

Instance Attribute Details

#argumentObject (readonly)

Returns the value of attribute argument.



187
188
189
# File 'lib/graphql/schema_comparator/changes.rb', line 187

def argument
  @argument
end

#criticalityObject (readonly)

Returns the value of attribute criticality.



187
188
189
# File 'lib/graphql/schema_comparator/changes.rb', line 187

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



187
188
189
# File 'lib/graphql/schema_comparator/changes.rb', line 187

def directive
  @directive
end

Instance Method Details

#messageObject



195
196
197
# File 'lib/graphql/schema_comparator/changes.rb', line 195

def message
  "Argument `#{argument.graphql_name}` was removed from directive `#{directive.graphql_name}`"
end

#pathObject



199
200
201
# File 'lib/graphql/schema_comparator/changes.rb', line 199

def path
  ["@#{directive.graphql_name}", argument.graphql_name].join('.')
end