query listTasks @auth(level: USER) {
  tasks {
    id
    taskName
    description
    priority
    status
    dueDate
    progress
    orderIndex
    commentCount
    attachmentCount
    files
    createdAt
    updatedAt
    createdBy
  }
}

query getTaskById($id: UUID!) @auth(level: USER) {
  task(id: $id) {
    id
    taskName
    description
    priority
    status
    dueDate
    progress
    orderIndex
    commentCount
    attachmentCount
    files
    createdAt
    updatedAt
    createdBy
  }
}

query getTasksByOwnerId($ownerId: UUID!) @auth(level: USER) {
  tasks(where: { ownerId: { eq: $ownerId } }) {
    id
    taskName
    description
    priority
    status
    dueDate
    progress
    orderIndex
    commentCount
    attachmentCount
    files
    createdAt
    updatedAt
    createdBy
  }
}

query filterTasks(
  $status: TaskStatus
  $priority: TaskPriority
) @auth(level: USER) {
  tasks(
    where: {
      status: { eq: $status }
      priority: { eq: $priority }
    }
  ) {
    id
    taskName
    description
    priority
    status
    dueDate
    progress
    orderIndex
    commentCount
    attachmentCount
    files
    createdAt
    updatedAt
    createdBy
  }
}
