Content
@
0 reply
0 recast
0 reaction
Tyler Pashigian🎩
@tylerpashigian
Does anyone know a better way to generate this prisma type based on this Recipe schema that includes nested schemas? Feels weird I have to include them like this. Would like to just import { type Recipe } and have those inherently included
3 replies
3 recasts
6 reactions
jtgi
@jtgi
That’s the way basically. In practice, I haven’t found it a big deal. A lot of the time it can just be inferred from the db call itself anyway.
1 reply
0 recast
0 reaction
John
@jwhiles
Prisma won't actually include reference fields unless you select them in your call - so it doesn't really make sense for them to export a type that includes all references. They don't know how you're going to structure your queries.
1 reply
0 recast
0 reaction
Alex 🙉
@alexk
Not a prisma expert but maybe try ChatGPT I’m curious if he comes up with an answer
0 reply
0 recast
0 reaction