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

Allow context option in refetchQueries #3852

Merged
merged 2 commits into from
Aug 26, 2018

Conversation

hwillson
Copy link
Member

These changes adjust mutate's refetchQueries option to allow queries to include a custom context option. This context will then be used when refetching the query, overriding any context that was previsouly set with the query, when it first ran.

These changes are a continuation of #3580. They do not include automatically setting the context of
refetched queries to say the context used for the parent mutation. A context has to be specified
with each refetched query, if needed. This was done to maintain backwards compatibilty (e.g. preventing issues that might arise by all of a sudden running refetched queries with a mutation context, that wasn't explicitly requested).

These changes adjust `mutate`'s `refetchQueries` option
to allow queries to include a custom `context` option.
This `context` will then be used when refetching the query,
overridding any `context` that was previsouly set with
the query, when it first ran.

These changes are a continuation of #3580. They do
not include automatically setting the `context` of
refetched queries to say the `context` used for
the parent mutation. A `context` has to be specified
with each refetched query, if needed. This was done
to maintain backwards compatibilty (e.g. preventing
issues that might arise by all of a sudden running
refetched queries with a mutation `context`, that
wasn't explicitly requested).
@hwillson hwillson merged commit ebf5297 into master Aug 26, 2018
@hwillson hwillson deleted the hwillson/refetch-queries-context branch August 26, 2018 15:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 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.

None yet

1 participant