Closed mkuchak closed 2 years ago
Thanks, @mkuchak, for digging in. Your fork looks good to me if you want to make a PR from that.
Hey! I redid the PR only with the necessary changes for the correct functioning of the two libraries.
prisma-proxy-express-server
also has a little problem sending the response which should be in JSON.
][prismaAction];
- prismaFunc(prismaArgs).then((data: any) => res.send(data));
+ prismaFunc(prismaArgs).then((data: any) => res.json(data));
});
As it currently stands some ORM calls like const totalUsers = await prisma.user.count()
don't work.
With the PR everything should work correctly.
Great work, looks good to me! Thanks for taking the time to use the library and discover some edge cases I hadn't considered.
published in 0.0.9
The version 0.0.8 has a small problem and is not working. The package published on NPM for this release has the
index.js
file, but the package.json is reading theindex.min.js
, so the library is not initialized.--
Another issue: sometimes Prisma returns undefined and the library throws an error. Maybe it's better to fix it to not throw error with undefined because that's normal during everyday use.
--
It would be nice to have a fix. By the way, cool project, it's helping me build a template with Cloudflare Workers. Very thanks! :)