hamish
hamishโ€ข3d ago

Extending "Meta" with downstream concat usage?

Is there a way to extend the meta when using concat and creating plugins and middleware? e.g having a plugin called permission and then requiring the meta data to extend the existing base Meta to contain a new required field e.g permission In my attempts I've just been getting "meta mismatch"
3 Replies
hamish
hamishOPโ€ข3d ago
Usage could be something like this?
type PermissionPluginMeta = {
permissions: string;
} & Meta;
type PermissionPluginMeta = {
permissions: string;
} & Meta;
Alex / KATT ๐Ÿฑ
GitHub
Procedure with parametes ? ยท trpc trpc ยท Discussion #5196
Is there something in trpc, that we can do to get role based procedures, something like this ping: publicProcedure.meta({ description: "Returns a Pong" }).query(() => { return "Po...
Alex / KATT ๐Ÿฑ
If the concat isn't flexible enough for you to make something like that a plugin, we'd love to improve it