nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
929 stars 194 forks source link

Stackblitz demo: useAsyncQuery works fine, useQuery stops the application in SSR! #585

Open Iran-110 opened 6 months ago

Iran-110 commented 6 months ago

Environment

Nuxt project info:


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

Rufflet commented 6 months ago

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
}