W
Wasp-lang•3w ago
neogeofun

Updating to Prisma v5

Half question, half suggestion. Prisma v5 has performance improvements, but more important transactions & createManyAndReturn are available. I feel transactions are very important because they allow easy way to rollback. If I am updating multiple tables for a single operation and if anything fails in this process, now I have to find all previous updates and make sure they are rolled back. I am not aware if there is an API way of doing this without transactions in prisma. Let me know your thoughts. Thanks. PS: I did try to update to v5, however, v4.16 comes from another dependency or from the internal engine I think, so I couldn't change it by just updating package.json.
4 Replies
kapa.ai
kapa.ai•3w ago
Hi @neogeofun. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Your suggestion to update to Prisma v5 for its performance improvements and new features like transactions and createManyAndReturn is valid and appreciated. However, based on the knowledge sources provided, it seems that Wasp is currently using Prisma v4.16 as per this issue (https://github.com/wasp-lang/wasp/issues/1570). There is an open issue about migrating to the latest version of Prisma, which includes changes like Prisma's "client extensions" feature and the ability to pass arguments to prisma db seed source (https://github.com/wasp-lang/wasp/issues/1281). However, it doesn't specify which version of Prisma they are planning to migrate to. As for your issue with updating to v5, it seems that the version of Prisma used by Wasp is determined internally and can't be changed just by updating the package.json file. This is suggested by a comment (https://github.com/wasp-lang/wasp/issues/629) on an issue about updating Prisma to v3.13, where a contributor mentioned the idea of allowing major NPM dependencies to be set via environment variables, but a member expressed concerns about users potentially causing problems by using versions that haven't been tested with Wasp. In conclusion, while your suggestion is valid, it seems that updating to Prisma v5 would require changes to Wasp's internal workings and thorough testing to ensure compatibility. I would recommend raising this as a new issue on the Wasp GitHub page for the developers to consider. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @neogeofun, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
neogeofun
neogeofun•3w ago
Yeah Kapa thanks man.
martinsos
martinsos•3w ago
@neogeofun all makes sense -> we have the update coming in the next release! PR is here and mostly done https://github.com/wasp-lang/wasp/pull/2231, and it will most likely be released at the end of this month / start of the next one (so in ~ 4 weeks).
neogeofun
neogeofun•3w ago
@martinsos thanks. đź‘Ť
Want results from more Discord servers?
Add your server