Skip to content

Commit 75d952e

Browse files
re-add update of dependent keys to query watcher
See #1156 (comment) for details
1 parent e859be0 commit 75d952e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Sources/Apollo/GraphQLQueryWatcher.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,14 @@ public final class GraphQLQueryWatcher<Query: GraphQLQuery>: Cancellable, Apollo
7474
guard let self = self else { return }
7575

7676
switch result {
77-
case .success:
77+
case .success(let graphQLResult):
7878
self.callbackQueue.async { [weak self] in
79-
self?.resultHandler(result)
79+
guard let self = self else {
80+
return
81+
}
82+
83+
self.dependentKeys = graphQLResult.dependentKeys
84+
self.resultHandler(result)
8085
}
8186
case .failure:
8287
// If the cache fetch is not successful, for instance if the data is missing, refresh from the server.

0 commit comments

Comments
 (0)