Class: GraphQL::SchemaComparator::Changes::SchemaSubscriptionTypeChanged

Inherits:
AbstractChange
  • Object
show all
Defined in:
lib/graphql/schema_comparator/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(old_schema, new_schema) ⇒ SchemaSubscriptionTypeChanged

Returns a new instance of SchemaSubscriptionTypeChanged.



321
322
323
324
325
# File 'lib/graphql/schema_comparator/changes.rb', line 321

def initialize(old_schema, new_schema)
  @old_schema = old_schema
  @new_schema = new_schema
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#criticalityObject (readonly)

Returns the value of attribute criticality.



319
320
321
# File 'lib/graphql/schema_comparator/changes.rb', line 319

def criticality
  @criticality
end

#new_schemaObject (readonly)

Returns the value of attribute new_schema.



319
320
321
# File 'lib/graphql/schema_comparator/changes.rb', line 319

def new_schema
  @new_schema
end

#old_schemaObject (readonly)

Returns the value of attribute old_schema.



319
320
321
# File 'lib/graphql/schema_comparator/changes.rb', line 319

def old_schema
  @old_schema
end

Instance Method Details

#messageObject



327
328
329
# File 'lib/graphql/schema_comparator/changes.rb', line 327

def message
  "Schema subscription type has changed from `#{old_schema.subscription}` to `#{new_schema.subscription}`"
end