Class: GraphQL::SchemaComparator::Changes::SchemaMutationTypeChanged

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) ⇒ SchemaMutationTypeChanged


307
308
309
310
311
# File 'lib/graphql/schema_comparator/changes.rb', line 307

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


305
306
307
# File 'lib/graphql/schema_comparator/changes.rb', line 305

def criticality
  @criticality
end

#new_schemaObject (readonly)

Returns the value of attribute new_schema


305
306
307
# File 'lib/graphql/schema_comparator/changes.rb', line 305

def new_schema
  @new_schema
end

#old_schemaObject (readonly)

Returns the value of attribute old_schema


305
306
307
# File 'lib/graphql/schema_comparator/changes.rb', line 305

def old_schema
  @old_schema
end

Instance Method Details

#messageObject


313
314
315
# File 'lib/graphql/schema_comparator/changes.rb', line 313

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