Class: GraphQL::SchemaComparator::Changes::DirectiveArgumentDescriptionChanged

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, old_argument, new_argument) ⇒ DirectiveArgumentDescriptionChanged

Returns a new instance of DirectiveArgumentDescriptionChanged.



632
633
634
635
636
637
# File 'lib/graphql/schema_comparator/changes.rb', line 632

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

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



630
631
632
# File 'lib/graphql/schema_comparator/changes.rb', line 630

def criticality
  @criticality
end

#directiveObject (readonly)

Returns the value of attribute directive.



630
631
632
# File 'lib/graphql/schema_comparator/changes.rb', line 630

def directive
  @directive
end

#new_argumentObject (readonly)

Returns the value of attribute new_argument.



630
631
632
# File 'lib/graphql/schema_comparator/changes.rb', line 630

def new_argument
  @new_argument
end

#old_argumentObject (readonly)

Returns the value of attribute old_argument.



630
631
632
# File 'lib/graphql/schema_comparator/changes.rb', line 630

def old_argument
  @old_argument
end

Instance Method Details

#messageObject



639
640
641
642
# File 'lib/graphql/schema_comparator/changes.rb', line 639

def message
  "Description for argument `#{new_argument.name}` on directive `#{directive.name}` changed"\
    " from `#{old_argument.description}` to `#{new_argument.description}`"
end