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

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

Instance Method Summary collapse

Instance Method Details

#resolve(input:) ⇒ Object



6
7
8
9
10
11
# File 'lib/twenty-backend/graphql/mutation/create_task.rb', line 6

def resolve(input:)
  Twenty::Task.new(input.to_h).save!
  {"errors" => []}
rescue => ex
  {"errors" => [ex.message]}
end