npm i @joshuaavalon/fastify-plugin-prisma
import prismaPlugin from "@joshuaavalon/fastify-plugin-prisma";
await fastify.register(prismaPlugin, opts);
const user = await fastify.db.user.findFirst();
- Type:
string | undefined
- Default:
undefined
Database connection string. undefined
uses url defined in schema.prisma
.
- Type:
Prisma.LogLevel[] | undefined
- Default:
undefined
Control which event to log. Default log all level.
- Type:
boolean | undefined
- Default:
false
Disable plugin in log bindings