Metadata
Procedure metadata allows you to add an optional procedure specific meta property which will be available in all middleware function parameters.
tip
Use metadata together with trpc-openapi if you want to expose REST-compatible endpoints for your application.
Create router with typed metadata
tsx
tsx
Example with per route authentication settings
server.tstsx
server.tstsx
Default meta, chaining, and shallow merging
You can set default values for your meta type, and if you chain meta on top of a base procedure it will be shallow merged.
tsx
tsx