Skip to content

Commit

Permalink
Merge branch 'main' into release-3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Apr 13, 2021
2 parents 3f2eee7 + e1d920f commit 9f9e1b4
Show file tree
Hide file tree
Showing 11 changed files with 241 additions and 101 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

### Bug fixes

- Increment `queryInfo.lastRequestId` only when making a network request through the `ApolloLink` chain, rather than every time `fetchQueryByPolicy` is called. <br/>
[@dannycochran](https://github.com/dannycochran) in [#7956](https://github.com/apollographql/apollo-client/pull/7956)

- In Apollo Client 2.x, a `refetch` operation would always replace existing data in the cache. With the introduction of field policy `merge` functions in Apollo Client 3, existing field values could be inappropriately combined with incoming field values by a custom `merge` function that does not realize a `refetch` has happened.

To give you more control over this behavior, we have introduced an `overwrite?: boolean = false` option for `cache.writeQuery` and `cache.writeFragment`, and an option called `refetchWritePolicy?: "merge" | "overwrite"` for `client.watchQuery`, `useQuery`, and other functions that accept `WatchQueryOptions`. You can use these options to make sure any `merge` functions involved in cache writes for `refetch` operations get invoked with `undefined` as their first argument, which simulates the absence of any existing data, while still giving the `merge` function a chance to determine the internal representation of the incoming data.
Expand Down Expand Up @@ -60,9 +57,18 @@

- Pass `variables` and `context` to a mutation's `update` function <br/>
[@jcreighton](https://github.com/jcreighton) in [#7902](https://github.com/apollographql/apollo-client/pull/7902)

### Documentation
TBD

## Apollo Client 3.3.15

- Increment `queryInfo.lastRequestId` only when making a network request through the `ApolloLink` chain, rather than every time `fetchQueryByPolicy` is called. <br/>
[@dannycochran](https://github.com/dannycochran) in [#7956](https://github.com/apollographql/apollo-client/pull/7956)

- During server-side rendering, allow initial `useQuery` calls to return final `{ loading: false, data }` results when the cache already contains the necessary data. <br/>
[@benjamn](https://github.com/benjamn) in [#7983](https://github.com/apollographql/apollo-client/pull/7983)

## Apollo Client 3.3.14

### Improvements
Expand Down
154 changes: 77 additions & 77 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"gatsby": "2.32.11",
"gatsby-theme-apollo-docs": "4.7.1",
"gatsby-theme-apollo-docs": "4.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"webpack-virtual-modules": "^0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development-testing/developer-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It provides the following features to all Apollo users for free:

Advanced features are available with a subscription to an Apollo Team or Enterprise plan.

To learn more about Graph Manager, check out the [overview](https://www.apollographql.com/docs/platform/graph-manager-overview/).
To learn more about Apollo Studio, check out the [overview](https://www.apollographql.com/docs/studio/).

## Apollo Client Devtools

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This documentation set focuses on React, but Apollo Client supports many other l
- [Vue](integrations/integrations/#vue)
- [Svelte](integrations/integrations/#svelte)
- [Ember](integrations/integrations/#ember)
- Meteor (thanks to [DDP-Apollo](https://github.com/Swydo/ddp-apollo))
- [Meteor](https://www.meteor.com) (thanks to [DDP-Apollo](https://github.com/Swydo/ddp-apollo))
- Web Components
- [Apollo Elements](integrations/integrations/#web-components)
- Native mobile
Expand Down
2 changes: 1 addition & 1 deletion docs/source/integrations/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A [Svelte](https://svelte.dev) integration is maintained by Tim Hall ([@timhall]

## Angular

An [Angular](https://angular.io) integration is maintained by Kamil Kisiela ([@kamilkisiela](https://github.com/kamilkisiela)). See the [website](https://apollo-angular.com] for more details.
An [Angular](https://angular.io) integration is maintained by Kamil Kisiela ([@kamilkisiela](https://github.com/kamilkisiela)). See the [website](https://apollo-angular.com) for more details.

## Ember

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"zen-observable-ts": "^1.0.0"
},
"devDependencies": {
"@babel/parser": "7.13.13",
"@babel/parser": "7.13.15",
"@rollup/plugin-node-resolve": "11.2.1",
"@testing-library/react": "9.4.1",
"@types/fast-json-stable-stringify": "2.0.0",
Expand Down
Loading

0 comments on commit 9f9e1b4

Please sign in to comment.