Is your feature request related to a problem? Please describe.
Currently, you need the subject helper to use CASL with Prisma. With client extensions being stable now, we can do better.
Describe the solution you'd like
Provide a pre-packaged extension in CASL, that will add the model name to a field in prisma client (maybe use a symbol for the field?). Make the default detectSubjectType know how to read that field.
Describe alternatives you've considered
This is fairly easily solvable in user-land, just thought it might be a good idea if the prisma package made the process streamlined.
Is your feature request related to a problem? Please describe.
Currently, you need the
subjecthelper to use CASL with Prisma. With client extensions being stable now, we can do better.Describe the solution you'd like
Provide a pre-packaged extension in CASL, that will add the model name to a field in prisma client (maybe use a symbol for the field?). Make the default
detectSubjectTypeknow how to read that field.Describe alternatives you've considered
This is fairly easily solvable in user-land, just thought it might be a good idea if the prisma package made the process streamlined.