Feature Request: Native tRPC Support in NestJS
Is there an existing issue that is already proposing this?
- [x] I have searched the existing issues
Is your feature request related to a problem? Please describe it
Currently, NestJS does not have native tRPC support. Developers who want to use tRPC with NestJS need to rely on community packages or create custom integrations, which often lack full compatibility with NestJS features like interceptors, guards, and decorators. This adds extra setup complexity and increases maintenance overhead.
Describe the solution you'd like
I would like to see first-class tRPC support in NestJS, similar to the existing GraphQL module.
This would mean:
- Official @nestjs/trpc package with smooth integration.
- Full compatibility with NestJS middleware, interceptors, guards, and dependency injection.
- Built-in tooling to auto-generate and consume tRPC routers without extra boilerplate.
Such native support would enable developers to use tRPC’s type-safe, end-to-end approach with the productivity and structure of NestJS.
Teachability, documentation, adoption, migration strategy
Adoption could be straightforward:
- Provide official documentation with setup examples (both monorepo and microservice scenarios).
- Include migration guides for existing REST or GraphQL projects wanting to switch to tRPC.
- Offer examples on how to integrate with authentication, authorization, validation, and real-time features in NestJS.
Clear docs and examples would make it easy for developers to start using tRPC in new projects and gradually migrate existing APIs.
What is the motivation / use case for changing the behavior?
tRPC is becoming increasingly popular in the TypeScript ecosystem because it enables type-safe, end-to-end APIs without the need for OpenAPI/Swagger or GraphQL schemas.
Native support in NestJS would:
- Reduce boilerplate and integration complexity.
- Allow developers to combine NestJS’ powerful architecture with tRPC’s DX advantages.
- Make it easier for teams to adopt NestJS when they prefer tRPC over REST or GraphQL.
This would improve developer experience, speed up API development, and expand NestJS’ appeal to a growing segment of the TypeScript community.
See #10046
See #10046
It’s been more than two years since then. Things might have changed, considering that more and more communities are now using tRPC.
my main concern is regarding the APIs and new abstractions that we would have to create in order to bring the full potential of tRPC into nestjs. You didn't suggest anything about that so I'm taking into account the comments made by @BrunnerLivio and @jmcdo29 and also the discussions at https://discord.gg/nestjs
Perhaps you can find some of the answers you’re looking for here. https://www.nestjs-trpc.io/
It seems to be heading in a good direction, but since it’s not official, no one can know for sure whether support for it will eventually end. That’s why it would be a better option if NestJS had native tRPC support.
btw there is another one 3rd-party lib for nestjs+trpc: https://natansal.github.io/NestRPC-docs/ (@nestjs-rpc/*)
Perhaps you can find some of the answers you’re looking for here. https://www.nestjs-trpc.io/
It seems to be heading in a good direction, but since it’s not official, no one can know for sure whether support for it will eventually end. That’s why it would be a better option if NestJS had native tRPC support.
This library has not been maintained for a long time, although it is the best available in this area.
nestjs-trpc Is this project dead?
We could also consider ts-rest as another alternative.
https://github.com/ts-rest/ts-rest
- https://ts-rest.com/server/nest
hey  ,I want to work on this issue, please assign me under the hacktoberfest 2025 . I would really appreciate for it. Thanks!!!