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"6 Replies
Usage could be something like this?
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...
If the
concat
isn't flexible enough for you to make something like that a plugin, we'd love to improve itI think that's a pretty good way around what I had in mind
but the plugin system where you could extend the "base" meta with whatever the plugin required would be ideal
Is there something that you had in mind long-term?
we don't have an exact plan but we want it to be flexible so would love a feature request
describe what you're trying to do, why and what you think is missing
Awesome, I've done that https://github.com/trpc/trpc/discussions/6199
GitHub
Extending Meta with middlewares / concat / plugins · trpc trpc · Di...
Context Let's set the scene of the problem and some ideas of what could be done. Let's say we have a base product that is just for authenticating users and we have multiple contexts that ca...