Skip to main content

One post tagged with "Prisma"

View All Tags

πŸ”§ Nestjs + Prisma, transaction propagation & test rollback & multi-tenancy

Β· 4 min read
James Pang
Project Initiator

Prisma interactive transaction​

Prisma is great. Yet it's support for interactive transaction is currently limited (Up to v5+),

// interactive transaction
prisma.$transaction([array_of_operations,]);

prisma.$transaction(async (tx) => {
// dependent operations
});

Container managed transactions​

As we integrate Prisma to NestJs, we want cross Services transaction propagation, container managed tx is even better. After some investigation, we come to @nestjs-cls/transactional,