Error Policy

Capture GraphQL errors and handle them accordingly.


Error Hook

Nuxt Apollo provides a nuxt hook named apollo:error which captures errors encountered by apollo client(s).

plugins/apollo.ts
export default defineNuxtPlugin((nuxtApp) => {  nuxtApp.hook('apollo:error', (error) => {    console.error(error)    // Handle different error cases  })})