Class: GraphQL::SchemaComparator::Changes::SchemaQueryTypeChanged

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

Returns a new instance of SchemaQueryTypeChanged


152
153
154
155
156
# File 'lib/graphql/schema_comparator/changes.rb', line 152

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


150
151
152
# File 'lib/graphql/schema_comparator/changes.rb', line 150

def criticality
  @criticality
end

#new_schemaObject (readonly)

Returns the value of attribute new_schema


150
151
152
# File 'lib/graphql/schema_comparator/changes.rb', line 150

def new_schema
  @new_schema
end

#old_schemaObject (readonly)

Returns the value of attribute old_schema


150
151
152
# File 'lib/graphql/schema_comparator/changes.rb', line 150

def old_schema
  @old_schema
end

Instance Method Details

#messageObject


158
159
160
# File 'lib/graphql/schema_comparator/changes.rb', line 158

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