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
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(directive, argument) ⇒ DirectiveArgumentAdded
Returns a new instance of DirectiveArgumentAdded.
1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1076 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.
1074 1075 1076 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1074 def argument @argument end |
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
1074 1075 1076 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1074 def criticality @criticality end |
#directive ⇒ Object (readonly)
Returns the value of attribute directive.
1074 1075 1076 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1074 def directive @directive end |
Instance Method Details
#message ⇒ Object
1086 1087 1088 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1086 def "Argument `#{argument.graphql_name}` was added to directive `#{directive.graphql_name}`" end |
#path ⇒ Object
1090 1091 1092 |
# File 'lib/graphql/schema_comparator/changes.rb', line 1090 def path ["@#{directive.graphql_name}", argument.graphql_name].join('.') end |