Education posts
Articles tagged Education on the Prisma blog: guides, announcements, and updates from the team building Prisma ORM and Prisma Postgres.
The Ultimate Guide to Testing with Prisma: Integration Testing
How to integration test a Prisma ORM API against a real database with Vitest and Supertest, using a local Prisma Postgres. Verified on Prisma 7.8, Vitest 4.

The Ultimate Guide to Testing with Prisma: Unit Testing
How to unit test functions that use Prisma ORM with Vitest: what to test, what to skip, and how to use a mocked client. Verified on Prisma 7.8 and Vitest 4.

The Ultimate Guide to Testing with Prisma: Mocking Prisma Client
How to mock Prisma Client with Vitest and vitest-mock-extended so you can unit test database code without a real database. Verified on Prisma ORM 7.8.

Building a REST API with NestJS and Prisma: Error Handling
Learn how to handle Prisma errors in a NestJS REST API: throw exceptions in controllers and build an exception filter for Prisma error codes like P2002. Updated for Prisma ORM 7 and NestJS 11.

How TypeScript 4.9 `satisfies` Your Prisma Workflows
Learn how TypeScript 4.9''s new `satisfies` operator can help you write type-safe code with Prisma


Database Metrics with Prisma, Prometheus & Grafana
This tutorial will help you to get started with Prisma's metrics feature. Learn how to integrate metrics into a web server using Prometheus and Grafana.

Improving Query Performance with Indexes using Prisma: Hash Indexes
Add a hash index in Prisma with @@index(type: Hash): a 64ms sequential scan becomes a 1.6ms lookup, verified on Prisma ORM 7 and PostgreSQL 17.

Improving Query Performance with Indexes using Prisma: B-Tree Indexes
Add a B-tree index in your Prisma schema with @@index and turn a 66ms sequential scan into a sub-millisecond lookup, an 80x improvement verified on Prisma ORM 7 and PostgreSQL 17 with EXPLAIN ANALYZE.

Improving Query Performance with Indexes using Prisma: Introduction
A database index is a secondary data structure that speeds up reads by reducing search scope. Learn the main index types, what they cost, and when to add one.

Monitor Your Server with Tracing Using OpenTelemetry & Prisma
This tutorial will help you to get started with Prisma's tracing feature and OpenTelemetry in Node.js. Learn how to integrate tracing and OpenTelemetry into a web server built with Express and Prisma.

End-To-End Type-Safety with GraphQL, Prisma & React: Codegen & Deployment
Learn how to build a fully type-safe application with GraphQL, Prisma, and React. This article walks you through setting up code generation to allow you to keep your TypeScript types in sync across your frontend and API. You will also deploy your completed project.

End-To-End Type-Safety with GraphQL, Prisma & React: API Prep
Learn how to build a fully type-safe application with GraphQL, Prisma, and React. This article walks you through setting up a TypeScript project, a PostgreSQL database, and Prisma.
