Open ghost opened 6 years ago
Why this:
id = attributes.delete(@model.primary_key) in:
id = attributes.delete(@model.primary_key)
def call(_obj, args, _ctx) attributes = args[@param_key].to_h id = attributes.delete(@model.primary_key) record = @model.find(id) record.update!(Services::NestedAttributes.call(@model, attributes)) record end
here: https://github.com/tb/northwind-graphql-ruby/blob/master/app/graphql/functions/update.rb ?
Is the .update! method in Rails chcking for id?
.update!
id
Why this:
id = attributes.delete(@model.primary_key)
in:here: https://github.com/tb/northwind-graphql-ruby/blob/master/app/graphql/functions/update.rb ?
Is the
.update!
method in Rails chcking forid
?