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?
Constructor Details
#initialize(directive, argument) ⇒ DirectiveArgumentAdded
Returns a new instance of DirectiveArgumentAdded.
837 838 839 840 841 842 843 844 845 |
# File 'lib/graphql/schema_comparator/changes.rb', line 837 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.
835 836 837 |
# File 'lib/graphql/schema_comparator/changes.rb', line 835 def argument @argument end |
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
835 836 837 |
# File 'lib/graphql/schema_comparator/changes.rb', line 835 def criticality @criticality end |
#directive ⇒ Object (readonly)
Returns the value of attribute directive.
835 836 837 |
# File 'lib/graphql/schema_comparator/changes.rb', line 835 def directive @directive end |
Instance Method Details
#message ⇒ Object
847 848 849 |
# File 'lib/graphql/schema_comparator/changes.rb', line 847 def "Argument `#{argument.name}` was added to directive `#{directive.name}`" end |