Is it bad to get db without context?

Hey, i was doing some code splitting in my create-t3-turbo app. I found out that i can access the (drizzle) db client without the context. So instead of ctx.db i just imported db from '@acme/db'. I was wondering if there is a downside to this approach and why db was added to the context then? It certainly makes my code cleaner because i don't have to pass the db client to functions.
1 Reply
barry
barry10mo ago
no its fine no difference in how the service will work
Want results from more Discord servers?
Add your server