You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to have a way of getting/building a query key from a procedure or router from the server. The implementation of getQueryKey shouldn't be bound to the client only.
Describe the solution you'd like to see
The following usecase describes a function where I get all the data from a dataset and populate the queryClient with each individual data as if they were fetched individually. Since I already have the dataset required I shouldn't be forced to refetch each individual data to populate the queryClient's cache:
An alternate solution would be to fetch each data using the SSR Helper (causing unnecessary queries to a db or other services) or to input the querykey by hand in the setQueryData.
Additional information
No response
👨👧👦 Contributing
🙋♂️ Yes, I'd be down to file a PR implementing this feature!
Funding
You can sponsor this specific effort via a Polar.sh pledge below
We receive the pledge once the issue is completed & verified
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like to request
I'd like to have a way of getting/building a query key from a procedure or router from the server. The implementation of getQueryKey shouldn't be bound to the client only.
Describe the solution you'd like to see
The following usecase describes a function where I get all the data from a dataset and populate the queryClient with each individual data as if they were fetched individually. Since I already have the dataset required I shouldn't be forced to refetch each individual data to populate the queryClient's cache:
`async function fetchSomething({ queryClient }: { queryClient: QueryClient }) {
const helpers = await createSSRHelper();
const somethingData = await helpers.something.getAllOfSomething.fetch({
withMoreStuff: true
});
}`
Describe alternate solutions
An alternate solution would be to fetch each data using the SSR Helper (causing unnecessary queries to a db or other services) or to input the querykey by hand in the setQueryData.
Additional information
No response
👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: