The providers in nestjs trpc router do not resolve
@trpc/server
I have trpc router (below) the getAccountsService always consoles undefined even though configured the nestjs-trpc like the way configured in the example. let know if I missed something.
@Router({ alias: 'accounts' })
export class AccountsTrpcRouter {
constructor(
@Inject(GetAccountsService) private readonly getAccountsService: GetAccountsService,
) {}
@Query({
input: getAccountsQuerySchema,
output: getAccountsResponseSchema,
})
async getAccounts(input: z.infer<typeof getAccountsQuerySchema>) {
return this.getAccountsService.getAccountsList(input);
}
}
@Router({ alias: 'accounts' })
export class AccountsTrpcRouter {
constructor(
@Inject(GetAccountsService) private readonly getAccountsService: GetAccountsService,
) {}
@Query({
input: getAccountsQuerySchema,
output: getAccountsResponseSchema,
})
async getAccounts(input: z.infer<typeof getAccountsQuerySchema>) {
return this.getAccountsService.getAccountsList(input);
}
}