How i read deleted rows in a querie ( i using soft-delete) ?
raphamartinez opened this issue · comments
Raphael Martinez - USystem commented
Is your feature request related to a problem? Please describe.
I want to query only the data deleted using soft delete so the user can choose which data they want to recover.
Raphael Martinez - USystem commented
a temporary solution in the resolver but it works.
example for userDTO
@Query(() => [UserDTO])
async usersDeleted( ): Promise<UserDTO[]> {
const repo = this.service.repo;
const data = await repo.createQueryBuilder('user').withDeleted().getMany();
return Promise.resolve(data);
}