mutation UpdateTask(
    $id: uuid!
    $attempt: Int!
    $status: task_status_enum!
    $end: timestamptz
    $additional_data: jsonb
    $error_data: jsonb
) {
    update_task_by_pk(
        pk_columns: { id: $id }
        _set: { status: $status, attempt: $attempt }
    ) {
        id
        status
    }
    update_task_output_by_pk(
        pk_columns: { id: $id, attempt: $attempt }
        _set: {
            end_time: $end
            status: $status
            output_data: $additional_data
            error_data: $error_data
        }
    ) {
        id
    }
}

