Prisma middleware callback parameter shape.
const params: MiddlewareParams = { action: "findMany", model: "User", args: { where: { id: 1 } }, dataPath: [], runInTransaction: false,}; Copy
const params: MiddlewareParams = { action: "findMany", model: "User", args: { where: { id: 1 } }, dataPath: [], runInTransaction: false,};
Optional
The Prisma model name (e.g. "User").
The Prisma action (e.g. "findMany", "create").
The arguments passed to the Prisma operation.
Path to nested data in the args.
Whether the operation runs inside a transaction.
Prisma middleware callback parameter shape.
Example