Class: GraphQL::SchemaComparator::Changes::InputFieldDefaultChanged

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_type, old_field, new_field) ⇒ InputFieldDefaultChanged

Returns a new instance of InputFieldDefaultChanged.



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

def initialize(input_type, old_field, new_field)
  @input_type = input_type
  @old_field = old_field
  @new_field = new_field
  @breaking = false
end

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



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

def breaking
  @breaking
end

#input_typeObject (readonly)

Returns the value of attribute input_type.



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

def input_type
  @input_type
end

#new_fieldObject (readonly)

Returns the value of attribute new_field.



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

def new_field
  @new_field
end

#old_fieldObject (readonly)

Returns the value of attribute old_field.



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

def old_field
  @old_field
end

Instance Method Details

#messageObject



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

def message
  "Input field `#{input_type.name}.#{old_field.name}` default changed"\
    " from `#{old_field.default_value}` to `#{new_field.default_value}`"
end