Svelte Query Prefetching
How can I prefetch queries in svelte kit?
The first issue i faced is passing the queryClient from +page.server.ts like this;
but I get this error from sveltekit "Cannot stringify arbitrary non-POJOs (data.queryClient)" so I have to create the client in the page component...
My plan was to use it in another +page.server.ts like this;
but since i cannot pass the queryClient i can't do that, and if I pass the client in the component i can't access in in the second +page.server.ts to prefetch.
any help with this would be appreciated, thanks.
0 Replies