You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .changeset/eighty-squids-fix.md
+6-10
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,14 @@
2
2
"@apollo/client": major
3
3
---
4
4
5
-
Make `ObservableQuery.reobserve` a private API. As a result, `reobserve` has been removed from `useQuery` as well. Instead prefer to use `ObservableQuery.setOptions(newOptions)` to reevaluate the query against a new set of options.
6
-
7
-
`ObservableQuery.rerun` has been introduced to reevaluate the query against the current set of options. If you previously used `reobserve` with no arguments, use `rerun` instead.
5
+
`ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead.
8
6
9
7
```diff
10
8
const observable = client.watchQuery(options);
11
9
12
-
// Use setOptions to set new options and reevaluate the query
13
-
- observable.reobserve(newOptions);
14
-
+ observable.setOptions(newOptions);
15
-
16
-
// Use rerun to reevaluate the query against the current set of options
17
-
- observable.reobserve();
18
-
+ observable.rerun();
10
+
// Use reobserve to set new options and reevaluate the query
11
+
- observable.setOptions(newOptions);
12
+
+ observable.reobserve(newOptions);
19
13
```
14
+
15
+
As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change.
0 commit comments