Class: GraphQL::SchemaComparator::Changes::FieldArgumentRemoved

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractChange

#breaking?, #dangerous?, #non_breaking?

Constructor Details

#initialize(object_type, field, argument) ⇒ FieldArgumentRemoved

Returns a new instance of FieldArgumentRemoved


123
124
125
126
127
128
# File 'lib/graphql/schema_comparator/changes.rb', line 123

def initialize(object_type, field, argument)
  @object_type = object_type
  @field = field
  @argument = argument
  @criticality = Changes::Criticality.breaking
end

Instance Attribute Details

#argumentObject (readonly)

Returns the value of attribute argument


121
122
123
# File 'lib/graphql/schema_comparator/changes.rb', line 121

def argument
  @argument
end

#criticalityObject (readonly)

Returns the value of attribute criticality


121
122
123
# File 'lib/graphql/schema_comparator/changes.rb', line 121

def criticality
  @criticality
end

#fieldObject (readonly)

Returns the value of attribute field


121
122
123
# File 'lib/graphql/schema_comparator/changes.rb', line 121

def field
  @field
end

#object_typeObject (readonly)

Returns the value of attribute object_type


121
122
123
# File 'lib/graphql/schema_comparator/changes.rb', line 121

def object_type
  @object_type
end

Instance Method Details

#messageObject


130
131
132
# File 'lib/graphql/schema_comparator/changes.rb', line 130

def message
  "Argument `#{argument.name}: #{argument.type}` was removed from field `#{object_type.name}.#{field.name}`"
end