prisma-redis-middleware icon indicating copy to clipboard operation
prisma-redis-middleware copied to clipboard

Middleware params type error

Open SnowMarble opened this issue 3 years ago • 0 comments

Currently, custom MiddlewareParams is being used, but this makes an type error: Property 'model' is optional in type 'MiddlewareParams' but required in type 'MiddlewareParams'. because Prisma only have to use their own MiddlewareParams type.

In order to resolve this problem, we can simply remove the MiddlewareParams and, import MiddlewareParams from Prisma .

import { Prisma } from "@prisma/client";
 :
export declare type MiddlewareParams = Prisma.MiddlewareParams

SnowMarble avatar Aug 18 '22 08:08 SnowMarble