Skip to main content
doc0blade47/compdocumentation home
Sign in

Prisma Layer

Last updated Oct 11, 2026
Relevant source files

The following files were used as context for generating this wiki page:

The Prisma Layer primarily refers to the PrismaExtension class, a build extension designed for the Trigger.dev platform. Its main purpose is to automate the discovery, generation, and deployment of the Prisma client and schema within a build process, especially when the Prisma schema is sourced from a published package like @trycompai/db.

This layer ensures that the correct Prisma client is generated both locally during development and within the deployment environment, handling schema resolution, dependency management, and environment variable configuration for database connections. It abstracts away the complexities of integrating Prisma into a serverless or containerized build pipeline.

PrismaExtension Overview

The PrismaExtension class is a core component that integrates Prisma into the build process. It implements the BuildExtension interface, providing hooks for onBuildStart and onBuildComplete to manage Prisma-related tasks.

Configuration Options

The behavior of the PrismaExtension can be customized through the PrismaExtensionOptions interface.

Option NameTypeDescription
versionstringOptional. The Prisma client version to use. If not specified, it attempts to determine the version from the build manifest.
Was this page helpful?