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

WIP: replace noFetch and forceFetch with fetch policy #1371

Merged
merged 20 commits into from
Mar 9, 2017
Merged

Conversation

helfer
Copy link
Contributor

@helfer helfer commented Mar 7, 2017

tiny little steps

  • If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change
  • Add your name and email to the AUTHORS file (optional)
  • If this was a change that affects the external API, update the docs and post a link to the PR in the discussion

docs update will happen with Caleb's PR.

* - cache-only: return result from cache if avaiable, fail otherwise.
* - network-only: return result from network, fail if network call doesn't succeed.
*/
export type FetchPolicy = 'cache-first' | 'cache-and-network' | 'network-first' | 'cache-only' | 'network-only';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we implement the others we should make this have only the ones we actually support, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm still planning to implement the others tomorrow :)

@@ -310,9 +310,10 @@ export class ObservableQuery<T> extends Observable<ApolloQueryResult<T>> {
this.stopPolling();
}

// If forceFetch went from false to true or noFetch went from true to false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL this comment

@helfer helfer merged commit d420cbd into master Mar 9, 2017
@helfer helfer deleted the fetch-policy branch March 9, 2017 18:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants