Open JoeRoddy opened 3 days ago
Ok it definitely could work. I have a little proof of concept working:
https://github.com/user-attachments/assets/3e32006f-2160-4035-815a-b7f70a78d56d
But I basically had to take out all of Prismock's non-type imports of Prisma, and then serialize the dmmf json after the prisma client is generated, and feed that into prismock to supply the datamodels, rather than importing it from prisma.
Hi!
Is there any way to get Prismock running in the browser? I have an application with extremely complex client state, and I basically want an autogenerated in-memory querying engine for that state, and this was the first library I thought of.
Unsure if this leverages the actual Prisma engine at all, or if everything is literally an in-memory JS implementation of Prisma's API's.
When I try to import Prismock into a client component, I get the following:
I guess I assumed this lib only referenced Prisma's types, and didn't use the actual engine? Do you think there's any chance this is possible @morintd ?