Class: GraphQL::SchemaComparator::Changes::DirectiveArgumentAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::DirectiveArgumentAdded
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#directive ⇒ Object
readonly
Returns the value of attribute directive.
Instance Method Summary collapse
-
#initialize(directive, argument) ⇒ DirectiveArgumentAdded
constructor
A new instance of DirectiveArgumentAdded.
- #message ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?, #path
Constructor Details
#initialize(directive, argument) ⇒ DirectiveArgumentAdded
Returns a new instance of DirectiveArgumentAdded.
997 998 999 1000 1001 1002 1003 1004 1005 |
# File 'lib/graphql/schema_comparator/changes.rb', line 997 def initialize(directive, argument) @criticality = if argument.type.non_null? Changes::Criticality.breaking else Changes::Criticality.non_breaking end @directive = directive @argument = argument end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
995 996 997 |
# File 'lib/graphql/schema_comparator/changes.rb', line 995 def argument @argument end |
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
995 996 997 |
# File 'lib/graphql/schema_comparator/changes.rb', line 995 def criticality @criticality end |
#directive ⇒ Object (readonly)
Returns the value of attribute directive.
995 996 997 |
# File 'lib/graphql/schema_comparator/changes.rb', line 995 def directive @directive end |
Instance Method Details
#message ⇒ Object
1007 1008 1009 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1007 def "Argument `#{argument.name}` was added to directive `#{directive.name}`" end |