2 Comments
User's avatar
Bal's avatar

…and the git link actually mentions it… :-)

I don’t say I’m totally confused, but rather that in this case it’s possible to argue both sides of the coin. I suppose there’s a best practice to get the maximum out of such a scenario.

Expand full comment
Bal's avatar

It seems that Prisma actually encourages the DB connection to be a singleton, to be able to make use of connection pooling. But it really seems a lot neater to use dependency injection. And then it looks kinda stoobid to pass around a singleton. Unless, for being able to test, of course. So what’s best, apart from not using Prisma, I wonder…?

Expand full comment