Skip to content

Commit a7e2a4d

Browse files
authored
Merge branch 'release-4.0' into jerel/is-helpers
2 parents c16eb7b + 28e857f commit a7e2a4d

39 files changed

+4402
-1350
lines changed

.changeset/forty-tomatoes-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables.

.changeset/fuzzy-tips-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume.

.changeset/khaki-keys-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": major
3+
---
4+
5+
An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`.

.changeset/large-plants-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`.

.changeset/mean-lizards-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type.

.changeset/pre.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
"fluffy-shoes-applaud",
2727
"forty-hairs-occur",
2828
"forty-shrimps-fry",
29+
"forty-tomatoes-punch",
2930
"four-ghosts-watch",
3031
"fresh-moose-hope",
3132
"funny-jeans-invent",
33+
"fuzzy-tips-sit",
3234
"giant-apes-thank",
3335
"giant-bags-share",
3436
"good-dolphins-peel",
@@ -39,8 +41,10 @@
3941
"hot-cycles-notice",
4042
"itchy-drinks-refuse",
4143
"itchy-roses-accept",
44+
"khaki-keys-deliver",
4245
"khaki-spies-work",
4346
"kind-fishes-develop",
47+
"large-plants-know",
4448
"late-trainers-peel",
4549
"light-apes-rescue",
4650
"light-dolphins-taste",
@@ -50,6 +54,7 @@
5054
"lucky-hats-push",
5155
"many-buses-allow",
5256
"many-papayas-hide",
57+
"mean-lizards-think",
5358
"metal-needles-search",
5459
"mighty-penguins-wink",
5560
"modern-feet-do",
@@ -98,6 +103,7 @@
98103
"tame-points-work",
99104
"tender-swans-flash",
100105
"thick-books-grin",
106+
"thin-peas-hear",
101107
"tidy-squids-poke",
102108
"tough-rockets-allow",
103109
"tough-taxis-smoke",

.changeset/thin-peas-hear.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@apollo/client": major
3+
---
4+
5+
`notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`.
6+
7+
```ts
8+
new ApolloClient({
9+
defaultOptions: {
10+
watchQuery: {
11+
// Use the v3 default
12+
notifyOnNetworkStatusChange: false
13+
}
14+
}
15+
})
16+
```

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# @apollo/client
22

3+
## 4.0.0-alpha.9
4+
5+
### Major Changes
6+
7+
- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`.
8+
9+
- [#12512](https://github.com/apollographql/apollo-client/pull/12512) [`e809b71`](https://github.com/apollographql/apollo-client/commit/e809b71aa9a02917a286afdbb03d5be8e5947c53) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`.
10+
11+
```ts
12+
new ApolloClient({
13+
defaultOptions: {
14+
watchQuery: {
15+
// Use the v3 default
16+
notifyOnNetworkStatusChange: false,
17+
},
18+
},
19+
});
20+
```
21+
22+
### Patch Changes
23+
24+
- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables.
25+
26+
- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume.
27+
28+
- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`.
29+
30+
- [#12542](https://github.com/apollographql/apollo-client/pull/12542) [`afb4fce`](https://github.com/apollographql/apollo-client/commit/afb4fce08859b2c6eebf288230a7c35b7acf2da6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type.
31+
332
## 4.0.0-alpha.8
433

534
### Major Changes

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/client",
3-
"version": "4.0.0-alpha.8",
3+
"version": "4.0.0-alpha.9",
44
"description": "A fully-featured caching GraphQL client.",
55
"private": true,
66
"keywords": [

0 commit comments

Comments
 (0)