Class: GraphQL::SchemaComparator::Changes::ObjectTypeInterfaceRemoved
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::ObjectTypeInterfaceRemoved
- Defined in:
- lib/graphql/schema_comparator/changes.rb
Instance Attribute Summary collapse
-
#criticality ⇒ Object
readonly
Returns the value of attribute criticality.
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
-
#object_type ⇒ Object
readonly
Returns the value of attribute object_type.
Instance Method Summary collapse
-
#initialize(interface, object_type) ⇒ ObjectTypeInterfaceRemoved
constructor
A new instance of ObjectTypeInterfaceRemoved.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(interface, object_type) ⇒ ObjectTypeInterfaceRemoved
Returns a new instance of ObjectTypeInterfaceRemoved.
343 344 345 346 347 348 349 |
# File 'lib/graphql/schema_comparator/changes.rb', line 343 def initialize(interface, object_type) @interface = interface @object_type = object_type @criticality = Changes::Criticality.breaking( reason: "Removing an interface from an object type can cause existing queries that use this in a fragment spread to error." ) end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
341 342 343 |
# File 'lib/graphql/schema_comparator/changes.rb', line 341 def criticality @criticality end |
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
341 342 343 |
# File 'lib/graphql/schema_comparator/changes.rb', line 341 def interface @interface end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
341 342 343 |
# File 'lib/graphql/schema_comparator/changes.rb', line 341 def object_type @object_type end |
Instance Method Details
#message ⇒ Object
351 352 353 |
# File 'lib/graphql/schema_comparator/changes.rb', line 351 def "`#{object_type.graphql_name}` object type no longer implements `#{interface.graphql_name}` interface" end |
#path ⇒ Object
355 356 357 |
# File 'lib/graphql/schema_comparator/changes.rb', line 355 def path object_type.path end |