Shared packages & examples

Extensions made by Prisma

The following is a list of extensions we've built at Prisma:

ExtensionDescription
Enables , a global database cache available in 300+ locations with built-in connection pooling
Enables , a service that captures change events from your database and delivers them instantly to your applications.
Adds read replica support to Prisma Client

Extensions made by Prisma's community

The following is a list of extensions created by the community. If you want to create your own package, refer to the Shared Prisma Client extensions documentation.

ExtensionDescription
Adds support for Supabase Row Level Security with Prisma
Implements the Materialized Path pattern that allows you to easily create and interact with tree structures in Prisma
Adds cursor-based streaming
Lets you query your database using natural language
Transforms SQL data from queries in streams to improve performance in larger datasets
Caches model queries with any compatible cache
Lets you query for random rows in your database
Adds support for paginating read queries

If you have built an extension and would like to see it featured, feel free to add it to the list by opening a pull request.

Examples

The following example extensions are provided as examples only, and without warranty. They are supposed to show how Prisma Client extensions can be created using approaches documented here. We recommend using these examples as a source of inspiration for building your own extensions.

ExampleDescription
Provides the current user's ID as context to Postgres audit log triggers
Adds a method to start interactive transactions without callbacks
Adds virtual / computed fields to result objects
Transforms the input arguments passed to Prisma Client queries to filter the result set
Runs custom validation logic on input arguments passed to mutation methods
Adds Active Record-like methods like save() and delete() to result objects
Uses strongly-typed runtime parsing for data stored in JSON columns
Adds reusable filters that can composed into complex where conditions for a model
Prevents sensitive data (e.g. password fields) from being included in results
Wraps Prisma Client queries with simple query timing and logging
Creates a client that only allows read operations
Adds a retry mechanism to transactions with exponential backoff and jitter
Uses Postgres row-level security policies to isolate data a multi-tenant application
Adds custom query methods to Prisma Client models
Demonstrates how to use result extensions to transform query results and add i18n to an app
Demonstrates how to add an exists method to all your models
Demonstrates how to add the updateIgnoreOnNotFound and deleteIgnoreOnNotFound methods to all your models.

Going further