Class: GraphQL::SchemaComparator::Changes::ObjectTypeInterfaceAdded
- Inherits:
-
AbstractChange
- Object
- AbstractChange
- GraphQL::SchemaComparator::Changes::ObjectTypeInterfaceAdded
- 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) ⇒ ObjectTypeInterfaceAdded
constructor
A new instance of ObjectTypeInterfaceAdded.
- #message ⇒ Object
- #path ⇒ Object
Methods inherited from AbstractChange
#breaking?, #dangerous?, #non_breaking?
Constructor Details
#initialize(interface, object_type) ⇒ ObjectTypeInterfaceAdded
Returns a new instance of ObjectTypeInterfaceAdded.
610 611 612 613 614 615 616 617 |
# File 'lib/graphql/schema_comparator/changes.rb', line 610 def initialize(interface, object_type) @criticality = Changes::Criticality.dangerous( reason: "Adding an interface to an object type may break existing clients " \ "that were not programming defensively against a new possible type." ) @interface = interface @object_type = object_type end |
Instance Attribute Details
#criticality ⇒ Object (readonly)
Returns the value of attribute criticality.
608 609 610 |
# File 'lib/graphql/schema_comparator/changes.rb', line 608 def criticality @criticality end |
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
608 609 610 |
# File 'lib/graphql/schema_comparator/changes.rb', line 608 def interface @interface end |
#object_type ⇒ Object (readonly)
Returns the value of attribute object_type.
608 609 610 |
# File 'lib/graphql/schema_comparator/changes.rb', line 608 def object_type @object_type end |
Instance Method Details
#message ⇒ Object
619 620 621 |
# File 'lib/graphql/schema_comparator/changes.rb', line 619 def "`#{object_type.graphql_name}` object implements `#{interface.graphql_name}` interface" end |
#path ⇒ Object
623 624 625 |
# File 'lib/graphql/schema_comparator/changes.rb', line 623 def path object_type.path end |