Skip to content

Commit

Permalink
Remove cache.writeData from local state documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn authored and hwillson committed Mar 2, 2020
1 parent e3e8b66 commit 36559aa
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 83 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
- **[BREAKING]** Apollo Client 2.x allowed `@client` fields to be passed into the `link` chain if `resolvers` were not set in the constructor. This allowed `@client` fields to be passed into Links like `apollo-link-state`. Apollo Client 3 enforces that `@client` fields are local only, meaning they are no longer passed into the `link` chain, under any circumstances. <br/>
[@hwillson](https://github.com/hwillson) in [#5982](https://github.com/apollographql/apollo-client/pull/5982)

- **[BREAKING]** `client|cache.writeData` have been fully removed. `writeData` usage is one of the easiest ways to turn faulty assumptions about how the cache represents data internally, into cache inconsistency and corruption. `client|cache.writeQuery`, `client|cache.writeFragment`, and/or `cache.modify` can be used to update the cache. <br/>
[@benjamn](https://github.com/benjamn) in [#5923](https://github.com/apollographql/apollo-client/pull/5923)

- `InMemoryCache` now supports tracing garbage collection and eviction. Note that the signature of the `evict` method has been simplified in a potentially backwards-incompatible way. <br/>
[@benjamn](https://github.com/benjamn) in [#5310](https://github.com/apollographql/apollo-client/pull/5310)

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/mutation-result.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
| `loading` | boolean | A boolean indicating whether your mutation is in flight |
| `error` | ApolloError | Any errors returned from the mutation |
| `called` | boolean | A boolean indicating if the mutate function has been called |
| `client` | ApolloClient | Your `ApolloClient` instance. Useful for invoking cache methods outside the context of the update function, such as `client.writeData` and `client.readQuery`. |
| `client` | ApolloClient | Your `ApolloClient` instance. Useful for invoking cache methods outside the context of the update function, such as `client.writeQuery` and `client.readQuery`. |
Loading

0 comments on commit 36559aa

Please sign in to comment.