Custom dependencies contexts #215
Replies: 2 comments 1 reply
-
Live/test/preview combinations are suitable for UI app development, but for backend development, I would like the possibility to define custom environments like dev/prod/mock/stage, etc. |
Beta Was this translation helpful? Give feedback.
-
@mbrandonw Hi, here is a compiling example: I thought about custom contexts while working on one of my backends. I have three environments: production, development, and mock. While production and development are configured through environment values, mock is much different. My backend works with many external services that require user authentication and don't have test APIs, so it's convenient for development purposes to replace them with mocks while keeping other functionality. Now I configure all these dependencies at the server start, but it would be more appropriate to define them with dependency keys. I don't know, maybe my case is very specific, and there is no need to support such cases in the core library. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to add the possibility to define custom dependency contexts or customize the current context detection.
I have two ideas:
DependencyKey
protocol:DependencyKey
protocol:Beta Was this translation helpful? Give feedback.
All reactions