Class: GraphQL::SchemaComparator::Changes::RootOperationTypeRemoved
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::RootOperationTypeRemoved
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#old_schema ⇒ Object
readonly
Returns the value of attribute old_schema.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
Instance Method Summary collapse
-
#initialize(old_schema:, operation_type:) ⇒ RootOperationTypeRemoved
constructor
A new instance of RootOperationTypeRemoved.
- #message ⇒ Object
- #operation_type_name ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(old_schema:, operation_type:) ⇒ RootOperationTypeRemoved
Returns a new instance of RootOperationTypeRemoved.
268 269 270 271 272 |
# File 'lib/graphql/schema_comparator/changes.rb', line 268 def initialize(old_schema:, operation_type:) @old_schema = old_schema @operation_type = operation_type @criticality = Changes::Criticality.breaking end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
266 267 268 |
# File 'lib/graphql/schema_comparator/changes.rb', line 266 def criticality @criticality end |
#old_schema ⇒ Object (readonly)
Returns the value of attribute old_schema.
266 267 268 |
# File 'lib/graphql/schema_comparator/changes.rb', line 266 def old_schema @old_schema end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type.
266 267 268 |
# File 'lib/graphql/schema_comparator/changes.rb', line 266 def operation_type @operation_type end |
Instance Method Details
#message ⇒ Object
274 275 276 |
# File 'lib/graphql/schema_comparator/changes.rb', line 274 def "Schema #{operation_type} root `#{operation_type_name}` was removed" end |
#operation_type_name ⇒ Object
282 283 284 285 286 287 288 289 290 291 |
# File 'lib/graphql/schema_comparator/changes.rb', line 282 def operation_type_name case operation_type when :query old_schema.query.graphql_name when :mutation old_schema.mutation.graphql_name when :subscription old_schema.subscription.graphql_name end end |
#path ⇒ Object
278 279 280 |
# File 'lib/graphql/schema_comparator/changes.rb', line 278 def path operation_type_name end |