Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"clean-sheep-hide",
"clean-sloths-travel",
"clever-islands-talk",
"clever-wolves-fly",
"clever-zebras-mate",
"cool-bikes-shake",
"cool-kiwis-hunt",
"cool-mice-visit",
"cuddly-spiders-tie",
"curvy-flies-accept",
"curvy-lamps-sing",
Expand All @@ -45,6 +47,7 @@
"empty-rabbits-move",
"empty-rats-cough",
"few-crabs-move",
"few-donuts-perform",
"flat-readers-invite",
"fluffy-shoes-applaud",
"forty-hairs-occur",
Expand Down Expand Up @@ -73,6 +76,7 @@
"gold-sloths-battle",
"good-dolphins-peel",
"gorgeous-chefs-tap",
"great-peaches-design",
"great-roses-jog",
"great-scissors-jam",
"grumpy-vans-type",
Expand All @@ -94,6 +98,7 @@
"kind-fishes-develop",
"kind-taxis-thank",
"large-plants-know",
"late-bottles-add",
"late-trainers-peel",
"lazy-baboons-rescue",
"lemon-pans-sit",
Expand All @@ -113,6 +118,7 @@
"mean-lizards-think",
"metal-needles-search",
"mighty-carrots-bathe",
"mighty-jobs-drum",
"mighty-penguins-wink",
"modern-feet-do",
"moody-lobsters-listen",
Expand Down Expand Up @@ -140,6 +146,7 @@
"poor-eels-punch",
"poor-spiders-hunt",
"popular-games-sleep",
"pretty-rocks-behave",
"proud-walls-shave",
"purple-balloons-accept",
"purple-bears-flash",
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# @apollo/client

## 4.0.0-rc.5

### Major Changes

- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Report masked fragments as complete even when a nested masked fragment contains partial data.

- [#12774](https://github.com/apollographql/apollo-client/pull/12774) [`511b4f3`](https://github.com/apollographql/apollo-client/commit/511b4f3e792a75aa5aa27b335e8119dbc2a9c254) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apply document transforms before reading data from the cache for `client.readQuery`, `client.readFragment`, `client.watchFragment`, `useFragment`, and `useSuspenseFragment`.

NOTE: This change does not affect the equivalent `cache.*` APIs. To read data from the cache without first running document transforms, run `cache.readQuery`, `cache.readFragment`, etc.

### Minor Changes

- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `dataState` to the value emitted from `client.watchFragment`.

### Patch Changes

- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache.watchFragment` now returns an `Unmasked<TData>` result since `cache.watchFragment` does not mask fragment spreads.

- [#12370](https://github.com/apollographql/apollo-client/pull/12370) [`0517163`](https://github.com/apollographql/apollo-client/commit/05171634404a44231329bf63eee960db52d08b25) Thanks [@phryneas](https://github.com/phryneas)! - `InMemoryCache`: Fields with an empty argument object are now saved the same way as fields without arguments.

Previously, it was possible that the reponses for these two queries would be stored differently in the cache:

```gql
query PlainAccess {
myField
}
```

would be stored as `myField`
and

```gql
query AccessWithoutOptionalArgument($optional: String) {
myField(optional: $optional)
}
```

would be stored as `myField({"optional":"Foo"})` if called with `{optional: "Foo"}` and as `myField({})` if called without the optional argument.

The cases `myField` and `myField({})` are equivalent from the perspective of a GraphQL server, and so in the future both of these will be stored as `myField` in the cache.

- [#12775](https://github.com/apollographql/apollo-client/pull/12775) [`454ec78`](https://github.com/apollographql/apollo-client/commit/454ec78b751853da07243174a6f9bdc4535e7e8f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead.

- [#12761](https://github.com/apollographql/apollo-client/pull/12761) [`db6f7c3`](https://github.com/apollographql/apollo-client/commit/db6f7c3823aaf58ee403ef45f0e817241b1c56a2) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate second argument to `readFragment` and `readQuery` - `optimistic` should be passed as part of the object in the first argument instead.

## 4.0.0-rc.4

### Minor Changes
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
@@ -1,6 +1,6 @@
{
"name": "@apollo/client",
"version": "4.0.0-rc.4",
"version": "4.0.0-rc.5",
"description": "A fully-featured caching GraphQL client.",
"private": true,
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions scripts/codemods/ac3-to-ac4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @apollo/client-codemod-migrate-3-to-4

## 1.0.0-rc.1

### Patch Changes

- [#12775](https://github.com/apollographql/apollo-client/pull/12775) [`454ec78`](https://github.com/apollographql/apollo-client/commit/454ec78b751853da07243174a6f9bdc4535e7e8f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead.

## 1.0.0-rc.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion scripts/codemods/ac3-to-ac4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apollo/client-codemod-migrate-3-to-4",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "Apollo Client Codemod to migrate from version 3 to version 4",
"keywords": [
"apollo",
Expand Down
Loading