Prisma JsonValue with TypeScript
So, we're having a problem in which we want to define a field in a modal that has some properties within it, but we DO NOT want it to be a relationship.
The problem is that I haven't found any great way to properly type a JsonValue with prisma. Does anybody know a solution for this?
Example:
This is just an example, but in our case, the "customInfo" CANNOT be inside the same model or another model
2 Replies
I've been using https://github.com/arthurfiorette/prisma-json-types-generator, it sucks that Json typing is not built into Prisma itself but this will do the job, at least on the type level
Wow thank you! I couldn't find anything