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

Constructor Details

#initialize(directive, argument) ⇒ DirectiveArgumentRemoved

Returns a new instance of DirectiveArgumentRemoved.



142
143
144
145
146
# File 'lib/graphql/schema_comparator/changes.rb', line 142

def initialize(directive, argument)
  @directive = directive
  @argument = argument
  @breaking = true
end

Instance Attribute Details

#argumentObject (readonly)

Returns the value of attribute argument.



140
141
142
# File 'lib/graphql/schema_comparator/changes.rb', line 140

def argument
  @argument
end

#directiveObject (readonly)

Returns the value of attribute directive.



140
141
142
# File 'lib/graphql/schema_comparator/changes.rb', line 140

def directive
  @directive
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


152
153
154
# File 'lib/graphql/schema_comparator/changes.rb', line 152

def breaking?
  !!@breaking
end

#messageObject



148
149
150
# File 'lib/graphql/schema_comparator/changes.rb', line 148

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