mutation createTask(
  $taskName: String!
  $description: String
  $priority: TaskPriority!
  $status: TaskStatus!
  $dueDate: Timestamp
  $progress: Int
  $orderIndex: Int
  $commentCount: Int
  $attachmentCount: Int
  $files: Any
  $ownerId:UUID!
) @auth(level: USER) {
  task_insert(
    data: {
      taskName: $taskName
      description: $description
      priority: $priority
      status: $status
      dueDate: $dueDate
      progress: $progress
      orderIndex: $orderIndex
      commentCount: $commentCount
      attachmentCount: $attachmentCount
      files: $files
      ownerId:$ownerId
    }
  ) 
}

mutation updateTask(
  $id: UUID!
  $taskName: String
  $description: String
  $priority: TaskPriority
  $status: TaskStatus
  $dueDate: Timestamp
  $progress: Int
  $assignedMembers: Any
  $orderIndex: Int
  $commentCount: Int
  $attachmentCount: Int
  $files: Any
) @auth(level: USER) {
  task_update(
    id: $id
    data: {
      taskName: $taskName
      description: $description
      priority: $priority
      status: $status
      dueDate: $dueDate
      progress: $progress
      orderIndex: $orderIndex
      commentCount: $commentCount
      attachmentCount: $attachmentCount
      files: $files
    }
  ) 
}

mutation deleteTask($id: UUID!) @auth(level: USER) {
  task_delete(id: $id) 
}
