How to use `getQueryKey` from the server side?
Hi guys, i cannot figure out how to use
getQueryKey
from the server side. Is this possible?
The use case is i want to be able to set the query data from an RSC (server side) to arbitrary data. The SSRHelper .prefetch()
function does not satisfy my needs, as i would like to set the query data to an arbitrary value from a query executed in the RSC code.
Any help would be hugely appreciated!1 Reply
I have fixed my issue temporarily by creating my own copy of
createServerSideHelpers
which includes a setData
method in the proxy.
However, i'm still very keen to understand what the proper approach to doing this would be, without any forking of code like i have done 😄