Set default status in 'CreateTask'

This commit is contained in:
0x1eef 2024-03-28 14:38:23 -03:00
parent b459240ddb
commit 85d0280b8c

View file

@ -6,7 +6,7 @@ module Twenty::GraphQL::Mutation
argument :input, Twenty::GraphQL::Input::TaskInput argument :input, Twenty::GraphQL::Input::TaskInput
def resolve(input:) def resolve(input:)
Twenty::Task.create(input.to_h) Twenty::Task.create input.to_h.merge(status: :backlog)
{"errors" => []} {"errors" => []}
rescue => ex rescue => ex
{"errors" => [ex.message]} {"errors" => [ex.message]}