Prisma ORM · Prisma Client queries

Find one by a unique field

Look up a record by id or unique field. It returns null if nothing matches.

const user = await prisma.user.findUnique({ where: { email: "[email protected]" } });

Official Prisma ORM documentation

More prisma client queries commands

All prisma client queries commands · Prisma ORM cheatsheet

Was this page helpful?