Class: Twenty::GraphQL::Mutation::UpdateTask

Inherits:
GraphQL::Schema::Mutation
  • Object
show all
Defined in:
lib/twenty/server/graphql/mutation/update_task.rb

Instance Method Summary collapse

Instance Method Details

#resolve(task_id:, input:) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/twenty/server/graphql/mutation/update_task.rb', line 9

def resolve(task_id:, input:)
  Twenty::Task
    .with_pk!(task_id)
    .update(input.to_h)
  {"errors" => []}
rescue => ex
  {"errors" => [ex.message]}
end