Join Slack
Powered by
Hey guys! Is there a way to get all available name...
# orm-help
m
Marvin
10/19/2020, 3:09 PM
Hey guys! Is there a way to get all available names of the generated models as a union type like this?
Copy code
type Models = 'User' | 'Post' | 'Comment'
👀 1
Marvin
10/20/2020, 1:43 PM
If you're interested:
https://github.com/prisma/prisma/issues/3973
r
Ryan
10/21/2020, 6:52 AM
@Marvin
current workaround would be to either use
Pick
with PrismaClient and select the models or use
Omit
with the ones not needed.
2
Views
Open in Slack
Previous
Next