Class: Twenty::GraphQL::Mutation::CreateTask

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

Instance Method Summary collapse

Instance Method Details

#resolve(input:) ⇒ Object



8
9
10
11
12
13
# File 'lib/twenty/server/graphql/mutation/create_task.rb', line 8

def resolve(input:)
  Twenty::Task.create input.to_h.merge(status: :backlog)
  {"errors" => []}
rescue => ex
  {"errors" => [ex.message]}
end