Add MongoDB transaction support to Prisma 8

Open
#30,765 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
mongodb, node.js, typescript

Research direction

The issue identifies the Mongo facade, runtime, and driver as the affected areas. Read their existing MongoDB client and session handling first, then trace how database operations reach the driver. Done means a callback-based db.transaction API runs operations through a MongoDB ClientSession; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Description

What problem are you trying to solve?

Prisma 8's MongoDB ORM is missing a transaction API, which is supported by mongo.

Proposed solution

Add a callback-based db.transaction(async (tx) => { ... }) API backed by a MongoDB ClientSession.

Alternatives considered

App-side logic to emulate transactions. Painful.

Scope and impact

The Mongo facade, runtime, and driver.

Dominant language
TypeScript
Stars
47.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
227

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from prisma/orm

All issues in prisma/orm

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.