We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin
v16.18.0
3.0.0
1.0.0
[email protected]
vite
runtimeConfig
css
components
build
modules
proxy
serverMiddleware
apollo
alias
@nuxtjs/[email protected]
@formkit/[email protected]
@pinia/[email protected]
-
I tried to change the fetch policy for apollo in the nuxt.config.ts to cache-first
nuxt.config.ts
cache-first
defaultOptions: { query: { fetchPolicy: 'cache-first', }, ... }
This setting has no effect on the queries, which are always executed with no-cache
no-cache
Queries should use fetch Policy from defaultOptions.
I use [email protected] and @nuxtjs/[email protected] Nuxt config:
apollo: { defaultOptions: { query: { fetchPolicy: 'cache-first', }, }, ... }
Query
const { data } = await useAsyncQuery(query)
In the https://github.com/nuxt-modules/apollo/blob/v5/src/runtime/composables.ts#L51 the queries get set to no-cache, how can I overwrite this? Is there a way that I can use apollo cache for queries?
No response
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
I'm oddly having the opposite problem and no-cache is not respected and always hits the cache
Just want to add I'm seeing this generally work for useQuery but not at all for useAsyncQuery
useQuery
useAsyncQuery
Successfully merging a pull request may close this issue.
Environment
Darwin
v16.18.0
3.0.0
1.0.0
[email protected]
vite
runtimeConfig
,css
,vite
,components
,build
,modules
,proxy
,serverMiddleware
,apollo
,alias
@nuxtjs/[email protected]
,[email protected]
,@formkit/[email protected]
,@pinia/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
-
Describe the bug
I tried to change the fetch policy for apollo in the
nuxt.config.ts
tocache-first
This setting has no effect on the queries, which are always executed with
no-cache
Expected behaviour
Queries should use fetch Policy from defaultOptions.
Reproduction
I use
[email protected]
and@nuxtjs/[email protected]
Nuxt config:
Query
Additional context
In the https://github.com/nuxt-modules/apollo/blob/v5/src/runtime/composables.ts#L51 the queries get set to
no-cache
, how can I overwrite this? Is there a way that I can use apollo cache for queries?Logs
No response
The text was updated successfully, but these errors were encountered: