Class: GraphQL::SchemaComparator::Changes::InputFieldAdded

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

Overview

Maybe Breaking

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_object_type, field) ⇒ InputFieldAdded

Returns a new instance of InputFieldAdded.



499
500
501
502
503
# File 'lib/graphql/schema_comparator/changes.rb', line 499

def initialize(input_object_type, field)
  @input_object_type = input_object_type
  @field = field
  @breaking = field.type.kind.non_null? ? true : false
end

Instance Attribute Details

#breakingObject (readonly)

Returns the value of attribute breaking.



497
498
499
# File 'lib/graphql/schema_comparator/changes.rb', line 497

def breaking
  @breaking
end

#fieldObject (readonly)

Returns the value of attribute field.



497
498
499
# File 'lib/graphql/schema_comparator/changes.rb', line 497

def field
  @field
end

#input_object_typeObject (readonly)

Returns the value of attribute input_object_type.



497
498
499
# File 'lib/graphql/schema_comparator/changes.rb', line 497

def input_object_type
  @input_object_type
end

Instance Method Details

#messageObject



505
506
507
# File 'lib/graphql/schema_comparator/changes.rb', line 505

def message
  "Input field `#{field.name}` was added to input object type `#{input_object_type.name}`"
end