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

Document setVariables internal API status #3692

Merged
merged 2 commits into from
Jul 30, 2018

Conversation

PowerKiKi
Copy link
Contributor

This clarifies setVariables as for internal use only because it has
a severe caveat where a result coming from cache will not notify subscribers.
That makes it a poor choice for most common use cases.

Instead refetch should be used and is now documented as such.

Also clarifies that watchQuery does not watch the result, but the cache store,
meaning that if the store does not change, the subcribers will not be notified.
In practice that means that a result coming from cache will never be seen by
subscribers.

This partially address #2712

Checklist:

  • If this PR is a new feature, please 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
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.

This clarifies `setVariables` as for internal use only because it has
a severe caveat where a result coming from cache will not notify subscribers.
That makes it a poor choice for most common use cases.

Instead `refetch` should be used and is now documented as such.

Also clarifies that `watchQuery` does not watch the result, but the cache store,
meaning that if the store does not change, the subcribers will not be notified.
In practice that means that a result coming from cache will never be seen by
subscribers.

This partially address apollographql#2712
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

This looks great @PowerKiKi - thanks very much!

@hwillson hwillson merged commit 2c6a9ae into apollographql:master Jul 30, 2018
@PowerKiKi PowerKiKi deleted the issue-2712-bis branch December 27, 2021 09:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants