Pulse Prisma Client extension
This is the package for the Prisma Client extension that enables usage of Prisma Pulse.
What is Prisma Pulse?
Prisma Pulse is a managed Change Data Capture (CDC) service that makes it easy to react to changes in your databases with type-safe model streams.
It enables developers to build real-time apps by streaming database changes into their application in a type-safe way — with just a few lines of code:
const stream = await prisma.user.stream();
for await (let event of stream) {
console.log(`Something happened in the database: `, event);
}
Here is an overview of the main features Prisma Pulse provides:
- Type-safe reactions to database changes
- Delivery guarantees for events: "at least once" and in the "right order"
- Resumable event streams in case your server goes down
- Unidirectional data flow via Change Data Capture (CDC)
- Great DX integrated with usage of Prisma ORM (easy setup, development and maintenance)
- Compatibility with your existing database
- Insights dashboard, so you can view and understand all database events captured by Pulse
Get started
Get started with Prisma Pulse by following the instructions in the docs.
If you want to learn more about Pulse, you can also check out these resoures:
Important
The Prisma Pulse extension offers separate implementations tailored for various runtimes, such as Node.js and Cloudflare Workers. If you're using bundler moduleResolution in your TSConfig, you must also explicitly set customConditions to either node
or workerd
depending on your target runtime. This will instruct TypeScript to match the correct type definitions of the Prisma Pulse extension, as well as any other packages that expose multiple entrypoints.
{
"compilerOptions": {
"target": "es2022",
"moduleResolution": "bundler",
"customConditions": ["workerd"]
}
}
Resources