Sqveeze
Sqveeze6mo ago

Suggestion to deal with external dependencies on backend side?

Hello, i have a question about dealing with external dependencies inside mutations and queries on the backend side. For example i have a route which is doing something, i can add for example database dependency inside the context so in the route i can use
ctx.db...
ctx.db...
This is fine as long as i want to use it with tRPC all the time. But since there is a lot of things changes and evolves in the world of JS everyday i would like to be a bit agnostic from external packages. If for example tRPC will be not be widely used 10 years later, it would be nice to just copy everything from the router and paste it somewhere else, and it will work like that because my code not rely on any external dependency which comes from the trpc context. What do you think about this? How do you deal with this?
0 Replies
No replies yetBe the first to reply to this messageJoin