Class: Twenty::GraphQL::Mutation::DestroyTask
- Inherits:
-
GraphQL::Schema::Mutation
- Object
- GraphQL::Schema::Mutation
- Twenty::GraphQL::Mutation::DestroyTask
- Defined in:
- lib/twenty/server/graphql/mutation/destroy_task.rb
Instance Method Summary collapse
Instance Method Details
#resolve(task_id:) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/twenty/server/graphql/mutation/destroy_task.rb', line 9 def resolve(task_id:) task = Twenty::Task.find(task_id) task.destroy! {ok: true, errors: []} rescue => ex {ok: false, errors: [ex.]} end |