apollo
apollo copied to clipboard
Stackblitz demo: useAsyncQuery works fine, useQuery stops the application in SSR!
Environment
Nuxt project info:
- Operating System: Linux
- Node Version: v20.10.0
- Nuxt Version: 3.8.2
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, modules, graphqlServer, apollo
- Runtime Modules: @nuxtjs/[email protected], @nuxtjs/[email protected], [email protected]
- Build Modules: -
Describe the bug
In the server side rendering (SSR) phase, useAsyncQuery
works fine but with useQuery
leads the application to crash. And, it was impossible to catch the raised exception.
Expected behaviour
The @nuxtjs/apollo
should handle errors and the application must continue to run in the server-side rendering (SSR).
Reproduction
Demo: https://stackblitz.com/edit/nuxtjs-apollo-usequery-error?file=README.md
Additional context
No response
Logs
No response
same problem
[Vue Router warn]: uncaught error during route navigation:
[[vite-node] [ERR_LOAD_URL] @vue/apollo-composable
at @vue/apollo-composable] {
cause: {
statusMessage: 'Vite Error',
message: '[vite-node] [ERR_LOAD_URL] @vue/apollo-composable',
stack: '[vite-node] [ERR_LOAD_URL] @vue/apollo-composable\n' +
'at @vue/apollo-composable'
},
statusCode: 500,
fatal: false,
unhandled: false,
statusMessage: 'Vite Error',
data: undefined,
__nuxt_error: true
}