Skip to content
New issue

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

Apollo client cache overwrites/negates getStaticProps revalidate property #89

Open
entropyfever opened this issue Jul 17, 2021 · 0 comments

Comments

@entropyfever
Copy link

I am currently new to both nextjs and apollo client so there is a possibility that I have not set the project in a right way. Even though product/[slug].js has revalidate: 1 property set in getStaticProps, it seems that apollo client caches its results, resulting in same results on sequential refreshes on the same product page. So, nextjs triggers the getStaticProps after I refresh the browser, but apollo client does not fetch the new data from wordpress/graphql. After I added fetchPolicy: "no-cache", in client.query(options), it started working, I mean I changed product title, product price in wordpress and I was getting the changes immediately after every second refresh of the browser.

Is this an issue ?

@entropyfever entropyfever changed the title Apollo client cache overwrites nextjs revalidate property Apollo client cache overwrites/negates getStaticProps revalidate property Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant