Skip to content

Commit

Permalink
Merge pull request #156 from callmephilip/patch-1
Browse files Browse the repository at this point in the history
add a note regarding reducer for custom redux actions
  • Loading branch information
helfer authored Mar 9, 2017
2 parents 7c11f0d + 04cd3c2 commit 5fcd043
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions react-docs/source/cache-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ const CommentsPageWithData = graphql(CommentsPageQuery, {

As you can see, the `reducer` option can be used to achieve the same goal as `updateQueries`, but it is more flexible and works with any type of **apollo** action, not just mutations. For example, the query result can be updated based on another query's result.

**Coming soon:** will be invoked on any redux action, not just apollo specific.

*Note:* It is not currently possible to respond to actions arriving from outside of Apollo (e.g. your custom Redux actions) in a result reducer. See [this thread](https://github.com/apollographql/apollo-client/issues/1013) for more information.


**When should you use reducer vs. updateQueries vs. refetchQueries?**
Expand Down

0 comments on commit 5fcd043

Please sign in to comment.