Class: GraphQL::SchemaComparator::Changes::FieldArgumentDefaultChanged

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, field, old_argument, new_argument) ⇒ FieldArgumentDefaultChanged

Returns a new instance of FieldArgumentDefaultChanged.



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

def initialize(type, field, old_argument, new_argument)
  @type = type
  @field = field
  @old_argument = old_argument
  @new_argument = new_argument
  @breaking = false
end

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



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

def breaking
  @breaking
end

#fieldObject (readonly)

Returns the value of attribute field.



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

def field
  @field
end

#new_argumentObject (readonly)

Returns the value of attribute new_argument.



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

def new_argument
  @new_argument
end

#old_argumentObject (readonly)

Returns the value of attribute old_argument.



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

def old_argument
  @old_argument
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#messageObject



330
331
332
333
# File 'lib/graphql/schema_comparator/changes.rb', line 330

def message
  "Default value for argument `#{new_argument.name}` on field `#{type.name}.#{field.name}` changed"\
    " from `#{old_argument.default_value}` to `#{new_argument.default_value}`"
end