nuxt-modules / apollo

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

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

Open Iran-110 opened 10 months ago

Iran-110 commented 10 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 10 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
}