Skip to content

Commit

Permalink
Merge pull request #144 from Chris-R3/update-links
Browse files Browse the repository at this point in the history
Update links
  • Loading branch information
Sashko Stubailo authored Jan 12, 2017
2 parents b4180a5 + 8593c7b commit 88d11eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion react-docs/source/mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Note the use of the [`name` option on the `graphql()` call](higher-order-compone

<h3 id="calling-mutations">Calling mutations</h3>

Most mutations will require arguments in the form of query variables, and you may wish to also provide other options to [ApolloClient#mutate](/core/apollo-client-api.html#mutate).
Most mutations will require arguments in the form of query variables, and you may wish to also provide other options to [ApolloClient#mutate](/core/apollo-client-api.html#ApolloClient.mutate).

You can directly pass options to the default `mutate` prop when you call it in the wrapped component:

Expand Down
2 changes: 1 addition & 1 deletion react-docs/source/receiving-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If there's been some kind of update on the server (e.g. a new repository added t

In order for refetches to be a viable strategy, you need to know when to refetch a query. There are few different ways you could do this. For example, you could imagine refetching the whole feed when the user adds a new repository to it.

Another common situation where a refetch might be necessary is when a mutation changes data that was previously fetched by a given query. Adding comments to a post, for example. In this case you can use [refetchQueries](http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient\.mutate) and/or [updateQueries](http://dev.apollodata.com/react/cache-updates.html#updateQueries) options for the mutation.
Another common situation where a refetch might be necessary is when a mutation changes data that was previously fetched by a given query. Adding comments to a post, for example. In this case you can use [refetchQueries](http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient.mutate) and/or [updateQueries](http://dev.apollodata.com/react/cache-updates.html#updateQueries) options for the mutation.

But, there are cases in which responding to user input or a mutation to update the UI doesn't help, for example if some *other* user decides to insert a repository into the GitHunt feed and we want to show it. Our client has no idea that this has happened and won't see the new feed item until the page is refreshed. One solution to that problem is polling.

Expand Down

0 comments on commit 88d11eb

Please sign in to comment.