Anyway, I think we should pass the fetch object returned from useRequestFetch into the http links. Thankfully this library already lets me override the fetch setting via the opts arg (doesn't type-check though) so I could confirm with this change it retains the SSR context. Should probably be part of the library and default though, hence the report.
Hey, I filed a bug earlier today with Nuxt that the
$fetch
global inuseAsyncData
loses the SSR event context. It is not a confirmed bug, so maybe it is actually intended behaviour. I am not sure. I saw in the nuxt sources they do this for theiruseFetch
composable: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/fetch.ts#L172-L178.Anyway, I think we should pass the
fetch
object returned fromuseRequestFetch
into the http links. Thankfully this library already lets me override thefetch
setting via the opts arg (doesn't type-check though) so I could confirm with this change it retains the SSR context. Should probably be part of the library and default though, hence the report.