ottomated / trpc-svelte-query

66 stars 9 forks source link

What's the difference between `procedure.ssr` vs `queryClient.prefetchQuery`? #1

Closed vishalbalaji closed 1 year ago

vishalbalaji commented 1 year ago

Hi, amazing work on this library. On the server, you use the .ssr method to pre-fetch data, which is, if I understand correctly, does the same thing as queryClient.prefetchQuery. I looked through the code a little and saw that calling ssr returns getSSRData, which doesn't seem to be calling prefetchQuery. Is it being called somewhere else that I might have missed or are you doing something entirely differently? If so, may I ask why? I am just a little curious on how this package works.

ottomated commented 1 year ago

old issue, closing, use discussions for questions like this