Feature request: Generate `model` names for `MiddlewareParams`
joeyaurel opened this issue · comments
Joey Aurel commented
Problem
The client generator generates a MiddlewareParams
type whose keys are model
, action
, ... and so forth. action
is from type PrismaAction
and consists of several action types. model
on the other hand is just a string
and one must always know the exact names of models available in the schema.
Suggested solution
Generate a PrismaModel
type (or similar) consisting of the names of models available as string
s and attach it to the model
property of MiddlewareParams
.
Alternatives
Leave it as it is.
Harshit Pant commented
I think this is a duplicate of prisma/prisma#3545
This actually being worked on so I expect it to land.