Skip to content

Feature Request: Native tRPC Support in NestJS #15527

@matteoTomicic

Description

@matteoTomicic

Is there an existing issue that is already proposing this?

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions