pbesh
Modifying payload client-side before caching
Say I have a payload that includes something like
category_id
in each of the items returned e.g.:
but I want to expand that client side to also include a full category: Category
object, e.g:
I only want to do this once and have the expanded objects cached. When using react-query directly, you can do this by just doing it in your query function. Is there a way to do this with tRPC? Some kind of "transform before caching" option?8 replies