Class: GraphQL::SchemaComparator::Changes::FieldAdded

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_type, field) ⇒ FieldAdded

Returns a new instance of FieldAdded.



358
359
360
361
362
# File 'lib/graphql/schema_comparator/changes.rb', line 358

def initialize(object_type, field)
  @object_type = object_type
  @field = field
  @breaking = false
end

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



356
357
358
# File 'lib/graphql/schema_comparator/changes.rb', line 356

def breaking
  @breaking
end

#fieldObject (readonly)

Returns the value of attribute field.



356
357
358
# File 'lib/graphql/schema_comparator/changes.rb', line 356

def field
  @field
end

#object_typeObject (readonly)

Returns the value of attribute object_type.



356
357
358
# File 'lib/graphql/schema_comparator/changes.rb', line 356

def object_type
  @object_type
end

Instance Method Details

#messageObject



364
365
366
# File 'lib/graphql/schema_comparator/changes.rb', line 364

def message
  "Field `#{field.name}` was added to object type `#{object_type.name}`"
end