Hello! Is there a way compose the main API and its Clients into an injectable service that you can use in more than one app?
So if you had your main DomainApi that comes from HttpApi.make(), and a client from HttpClient.make, I want to sort everything by feature in vertical slices. Using Effect Atom for state management, I want it to be dependant on an ApiClient, but that requires the atoms to be tied to a specific app.
Is there anyway to define
-> FeatureApiGroup
-> FeatureApi from HttpApi.make()
-> FeatureApiClient from HttpApiClient.make()
-> FeatureAtoms from makeAtomRuntime( Instead of passing ApiClient.Default, pass an Injectable Api that requires an ApiClient that has the FeatureGroup implemented)
Then in the app
-> Define Api + ApiClient for the app that merges each Features Api and ApiClient together, then the AtomRuntime in that app from the registry or something uses the apps ApiClient instead of the featuresApiClient so that you could implement it in multiple apps if you wanted, but the feature is fully isolated from the main app in its implementation.