Effect CommunityEC
Effect Community2y ago
4 replies
leighman

Ways to Wrap Prisma $transaction with Effect

Has anyone wrapped prisma.$transaction with Effect? At the moment we use it at the boundary so we just use runPromise inside the $transaction callback but it would be nice to have something like withinDbTransaction that uses the open transaction or takes one if needed. I tried to write that wrapper thinking it's a Scope type thing but found that I need to use runPromise internally and so ran into problems with having to provide dependencies at that point to satisfy the runPromise
never
. Anyone done this? / have advice on how the dependency requirement could be pushed up?
Was this page helpful?