Method: Twenty::GraphQL::Type::Query#tasks

Defined in:
lib/twenty-backend/graphql/type/query.rb

#tasks(status:, project_id: nil) ⇒ Object



16
17
18
19
20
21
# File 'lib/twenty-backend/graphql/type/query.rb', line 16

def tasks(status:, project_id: nil)
  tasks = Twenty::Task
    .where(status:)
    .order(updated_at: :desc)
  project_id ? tasks.where(project_id:) : tasks
end