Class: GraphQL::SchemaComparator::Changes::FieldArgumentRemoved
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::FieldArgumentRemoved
- 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.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#object_type ⇒ Object
readonly
Returns the value of attribute object_type.
Instance Method Summary collapse
-
#initialize(object_type, field, argument) ⇒ FieldArgumentRemoved
constructor
A new instance of FieldArgumentRemoved.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(object_type, field, argument) ⇒ FieldArgumentRemoved
Returns a new instance of FieldArgumentRemoved.
168 169 170 171 172 173 174 175 |
# File 'lib/graphql/schema_comparator/changes.rb', line 168 def initialize(object_type, field, argument) @object_type = object_type @field = field @argument = argument @criticality = Changes::Criticality.breaking( reason: "Removing a field argument is a breaking change because it will cause existing queries that use this argument to error." ) end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
166 167 168 |
# File 'lib/graphql/schema_comparator/changes.rb', line 166 def argument @argument end |
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
166 167 168 |
# File 'lib/graphql/schema_comparator/changes.rb', line 166 def criticality @criticality end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
166 167 168 |
# File 'lib/graphql/schema_comparator/changes.rb', line 166 def field @field end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
166 167 168 |
# File 'lib/graphql/schema_comparator/changes.rb', line 166 def object_type @object_type end |
Instance Method Details
#message ⇒ Object
177 178 179 |
# File 'lib/graphql/schema_comparator/changes.rb', line 177 def "Argument `#{argument.graphql_name}: #{argument.type.to_type_signature}` was removed from field `#{object_type.graphql_name}.#{field.graphql_name}`" end |
#path ⇒ Object
181 182 183 |
# File 'lib/graphql/schema_comparator/changes.rb', line 181 def path argument.path end |