Closed talaxasy closed 1 year ago
I found that by default, Apollo Client throws away partial data - link. In order to get these partial results I should define an error policy for my operation. But how is this done specifically in this library?
Ok, I found that it can configured by defaultOptions
property in nuxt.config
//nuxt.config.ts
apollo: {
defaultOptions: {
query: {
errorPolicy: 'all',
},
},
}
Environment
Linux
v16.11.0
3.0.0
1.0.0
yarn@1.22.11
vite
srcDir
,modules
,build
,routeRules
,app
,hooks
,swiper
,typescript
,tailwindcss
,apollo
,experimental
,runtimeConfig
,postcss
@nuxtjs/tailwindcss@6.1.3
,unplugin-icons/nuxt
,nuxt-swiper@0.1.6
,nuxt-graphql-client@0.2.25
,@nuxtjs/apollo@5.0.0-alpha.5
Build Modules:
-
Describe the bug
I try to get
data
from response witherrors
. I can't extract "data" from the response when there are more "errors" next to it, I have already tried 2 libraries nuxt-graphql-client and @nuxt/apollo, both have the same situation.@nuxtjs/apollo
nuxt-graphql-client
Expected behaviour
In addition to the error, I also expect to receive the data that is in the response
Reproduction
No response
Additional context
No response
Logs
No response