Content pfp
Content
@
0 reply
0 recast
0 reaction

Tyler Pashigian🎩 pfp
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

John  pfp
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

John  pfp
John
@jwhiles
One thing you can do is link the creation of the type and the query e.g.
0 reply
0 recast
0 reaction