Skip to main content
The @healthzkit/prisma package provides a HealthAdapter for an existing Prisma PrismaClient. Each check calls $connect(), runs a lightweight SQL probe (default SELECT 1) via $queryRawUnsafe, and returns ok with metadata.latencyMs plus any fields from an optional metadata hook; failures return fail with the caught error. Install the adapter package and @prisma/client (your app already has both if you use Prisma):
Drivers stay in your app. This package peers only on @prisma/client. The probe uses the client you pass in; datasource URLs and driver packages remain in the application that constructs PrismaClient.

Package entrypoints

  • @healthzkit/prisma — prismaAdapter and option types.
  • @healthzkit/prisma/prisma — prismaAdapter only.

Options

Basic usage

Pass the same PrismaClient your service uses for application queries:

Custom query and metadata

When to use this vs other adapters

Scheduling

For busy databases, pair this adapter with a schedule on the check so readiness reads cached results (see Scheduling).