Transform prisma outputs relations to an array of strings instead of array of objects. this method uses the transformOutputArraysToIds method but it handles the $transaction response as it returns an array of data and the count field.
Usage
@Injectable()exportclassService {findAll(query:any):Promise<[Client[],number]> {constwhere=query.where || {};returnthis.prisma.$transaction([this.prisma.client.findMany(query),this.prisma.client.count({ where }), ]); }}