What's Changed
✨ Route metadata
feat(server): route metadata by @LouisHaftmann in #1751
Docs
Example
interface Context {
// ...
}
interface Meta {
data: string;
}
export const appRouter = trpc
.router<
Context,
/* <✨✨✨> */
Meta
/* </✨✨✨> */
>()
.query('query', {
/* <✨✨✨> */
meta: {
data: 'foo',
},
/* </✨✨✨> */
async resolve({ input }) {
return { input };
},
})
New Contributors
Full Changelog: v9.21.0...v9.22.0