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

Add cache-and-network fetchPolicy to beforeQuery #796

Merged
merged 3 commits into from
Jul 6, 2020
Merged

Add cache-and-network fetchPolicy to beforeQuery #796

merged 3 commits into from
Jul 6, 2020

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Jul 4, 2020

This PR closes #717 by changing beforeQuery's fetchPolicy to 'cache-and-network' (previously, it didn't have one).

Was working on the Cells doc (https://github.com/redwoodjs/redwoodjs.com/pull/202) and found #717 in the process of documenting. Figured I'd close it out real quick because it seemed simple enough (is it this simple?).

There could also be complementary PRs to remove the export of beforeQuery in scaffolds (as it wouldn't differ from just the default after this gets merged). Or is it better to be explicit?

@cannikin
Copy link
Member

cannikin commented Jul 6, 2020

There could also be complementary PRs to remove the export of beforeQuery in scaffolds (as it wouldn't differ from just the default after this gets merged). Or is it better to be explicit?

If this is now the default I think it's fine to remove it from the scaffolds!

@jtoar
Copy link
Contributor Author

jtoar commented Jul 6, 2020

@cannikin Removed it from the scaffolds; ready to merge if you approve!

@jtoar jtoar merged commit 34a6444 into redwoodjs:main Jul 6, 2020
@jtoar jtoar deleted the add-fetchPolicy-to-beforeQuery branch July 6, 2020 19:27
@thedavidprice thedavidprice added this to the next release milestone Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default to 'cache-and-network' Apollo policy
3 participants