Class: GraphQL::SchemaComparator::Changes::InputFieldDescriptionChanged

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

Returns a new instance of InputFieldDescriptionChanged.



231
232
233
234
235
236
# File 'lib/graphql/schema_comparator/changes.rb', line 231

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.



229
230
231
# File 'lib/graphql/schema_comparator/changes.rb', line 229

def breaking
  @breaking
end

#input_typeObject (readonly)

Returns the value of attribute input_type.



229
230
231
# File 'lib/graphql/schema_comparator/changes.rb', line 229

def input_type
  @input_type
end

#new_fieldObject (readonly)

Returns the value of attribute new_field.



229
230
231
# File 'lib/graphql/schema_comparator/changes.rb', line 229

def new_field
  @new_field
end

#old_fieldObject (readonly)

Returns the value of attribute old_field.



229
230
231
# File 'lib/graphql/schema_comparator/changes.rb', line 229

def old_field
  @old_field
end

Instance Method Details

#messageObject



238
239
240
241
# File 'lib/graphql/schema_comparator/changes.rb', line 238

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