-
Notifications
You must be signed in to change notification settings - Fork 685
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
#3114 Set fetch policy and next fetch policy for cms block query #3131
#3114 Set fetch policy and next fetch policy for cms block query #3131
Conversation
If your PR is missing information, check against the original template here. At a minimum you must have the section headers from the template and provide some information in each section. |
variables: { identifiers } | ||
variables: { identifiers }, | ||
fetchPolicy: 'cache-and-network', | ||
nextFetchPolicy: 'cache-first' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't cache-first mean that updated content would not show if it was edited again?
https://medium.com/@galen.corey/understanding-apollo-fetch-policies-705b5ad71980?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't cache-first mean that updated content would not show if it was edited again?
On first load, cache-and-network always updates with network (server) data. But if that data ever changes on the client, the query makes another call to the server. We applied the nextFetchPolicy
to avoid excessive server calls as it allows the initial network fetch but then always trusts the cache from then on (for this page load).
QA Approved. |
Description
This PR sets the fetch policy for CMS Block.
Related Issue
Closes #3114.
Acceptance
N/A
Verification Stakeholders
Specification
Screenshots / Screen Captures (if appropriate)
N/A
Checklist