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: docs/source/migration/3.0.mdx
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -499,6 +499,7 @@ val response = apolloClient.query(request)
499
499
Watchers now default to a `CacheOnly` refetchPolicy instead `CACHE_FIRST`. To keep behaviour unchanged, set a `refetchPolicy` on your watchers:
500
500
501
501
```kotlin
502
+
// Replace
502
503
val response = apolloClient.query(query)
503
504
.watcher()
504
505
.toFlow()
@@ -509,6 +510,18 @@ val response = apolloClient.query(query)
509
510
.watch()
510
511
```
511
512
513
+
Watchers are now only watching field keys such as `User:42.name` and not object keys such as `User:42`. This is so that query only get refetch when fields they actually watch change, not when the object changes.
514
+
515
+
```kotlin
516
+
// Replace
517
+
apolloClient.apolloStore.publish("User:42")
518
+
519
+
// With
520
+
apolloClient.apolloStore.publish("User:42.name")
521
+
522
+
```
523
+
524
+
512
525
#### `CacheKeyResolver`
513
526
514
527
The `CacheKeyResolver` API has been split in two different APIs:
0 commit comments