-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
I'm trying to use the typescript-nestjs client generator, and facing an issue when trying to configure the generated client with values from another provider.
Describe the solution you'd like
In most packages, the way to do it is with Module.forRootAsync as described here.
I think it would be very helpful if we could do something like this:
@Module({
imports: [
ApiModule.forRootAsync({
import: [SettingsModue],
inject: [SettingsServiceProvider],
useFactory: (settingsService) => ({
username: settingsService.username,
password: settingsService.password,
...
}),
}),
],
})
export class AppModule {}Describe alternatives you've considered
Currently I'm using the regular typescript client, and wrapping it in a nest provider manually. But i would like to move away from this solution if possible.
Additional context
Reactions are currently unavailable