Class: GraphQL::SchemaComparator::Changes::DirectiveArgumentAdded

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

Returns a new instance of DirectiveArgumentAdded.



749
750
751
752
753
# File 'lib/graphql/schema_comparator/changes.rb', line 749

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

Instance Attribute Details

#argumentObject (readonly)

Returns the value of attribute argument.



747
748
749
# File 'lib/graphql/schema_comparator/changes.rb', line 747

def argument
  @argument
end

#directiveObject (readonly)

Returns the value of attribute directive.



747
748
749
# File 'lib/graphql/schema_comparator/changes.rb', line 747

def directive
  @directive
end

Instance Method Details

#breaking?Boolean

Returns:

  • (Boolean)


759
760
761
# File 'lib/graphql/schema_comparator/changes.rb', line 759

def breaking?
  !!@breaking
end

#messageObject



755
756
757
# File 'lib/graphql/schema_comparator/changes.rb', line 755

def message
  "Argument `#{argument.name}` was added to directive `#{directive.name}`"
end