Songkeys
Songkeys2mo ago

[v11] Change responseMeta in procedure

Is there a way to do so? I need to add a cache header to one specific api. I found this doc quite confused me. I don't have createTRPCNext in my app (mine is app rotuer created from t3 template). And this seems a global caching rather than a single api route one. Thank you in advanced.
Response Caching | tRPC
The below examples uses Vercel's edge caching to serve data to your users as fast as possible.
1 Reply
Songkeys
Songkeys2mo ago
found this: https://github.com/trpc/trpc/discussions/2017 looks like still an issue?
GitHub
Procedure specific custom request headers · trpc trpc · Discussion ...
From the documentation and code example it seems like Client side HTTP headers can only be configured in the tRPC client and not call site when doing a query or mutation. But there are use cases wh...