tRPCttRPC
Powered by
Ahmed BouhuoliaA
tRPC•6d ago•
1 reply
Ahmed Bouhuolia

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);
}
}
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Not getting legacy router ops in merged tRPC 9 router
NickNNick / ❓-help
3y ago
Querying external api in trpc router not working
josh-dev627Jjosh-dev627 / ❓-help
3y ago
tRPC with app router
SzymonSSzymon / ❓-help
3y ago