apollo icon indicating copy to clipboard operation
apollo copied to clipboard

With SSR, the same requests in different components result in slow or endless loading

Open negezor opened this issue 3 years ago • 1 comments

Describe the bug The same request in different components results in infinite or slow page loading.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/s/github/negezor/nuxt-apollo-3-slow-ssr'
  2. Reload page in Slow SSR Example
  3. Watch endless loading

Expected behavior The page loads as fast as on Fast SSR Example

Versions vue: 2.6.14 nuxt: like 2.16, but nuxt-edge @vue/apollo-composable: 4.0.0-alpha.12 @apollo/client: 3.3.21

Additional context Everything works on apollo-client@2, but if you migrate the client to apollo-client@3, this strange behavior occurs. I checked it on my production project, the only thing that changed is that it takes ~10 seconds to load from SSR. In different components I call the useViewer() hook which in the apollo cache contains the request from query { viewer { id username permissions } }

negezor avatar Jul 16 '21 10:07 negezor

I've experienced same issues with latest apollo and vue apollo, 2 simple SSR queries takes over 15 seconds to load page.

xxSkyy avatar Jan 17 '22 11:01 xxSkyy