CodeZettaInterview Hub

NestJS · ORM Concepts · Mid-Level · Live Coding

How do you handle transactions in Nest services?

Short Interview Answer

ORM transaction APIs / QueryRunner / Prisma $transaction; pass transactional client/unit-of-work through the use-case.

Detailed Explanation

Don't open transactions in controllers. Watch request-scoped pitfalls. Keep transactions short.

Did you know this answer?