{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-android/issues/304","repository_url":"https://api.github.com/repos/apollographql/apollo-android","labels_url":"https://api.github.com/repos/apollographql/apollo-android/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-android/issues/304/comments","events_url":"https://api.github.com/repos/apollographql/apollo-android/issues/304/events","html_url":"https://github.com/apollographql/apollo-android/issues/304","id":212918401,"number":304,"title":"Add QueryWatching","user":{"login":"BenSchwab","id":1754153,"avatar_url":"https://avatars3.githubusercontent.com/u/1754153?v=3","gravatar_id":"","url":"https://api.github.com/users/BenSchwab","html_url":"https://github.com/BenSchwab","followers_url":"https://api.github.com/users/BenSchwab/followers","following_url":"https://api.github.com/users/BenSchwab/following{/other_user}","gists_url":"https://api.github.com/users/BenSchwab/gists{/gist_id}","starred_url":"https://api.github.com/users/BenSchwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenSchwab/subscriptions","organizations_url":"https://api.github.com/users/BenSchwab/orgs","repos_url":"https://api.github.com/users/BenSchwab/repos","events_url":"https://api.github.com/users/BenSchwab/events{/privacy}","received_events_url":"https://api.github.com/users/BenSchwab/received_events","type":"User","site_admin":false},"labels":[{"id":523908451,"url":"https://api.github.com/repos/apollographql/apollo-android/labels/Priority:%20High","name":"Priority: High","color":"d93f0b","default":false},{"id":523910085,"url":"https://api.github.com/repos/apollographql/apollo-android/labels/Type:%20Discussion","name":"Type: Discussion","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-09T02:34:49Z","updated_at":"2017-03-09T18:59:40Z","closed_at":null,"body":"Proposed changes:\r\n\r\n- Add watch to `ApolloCall` : ` @Nonnull ApolloCall<T> watch(@Nullable Callback<T> callback);` (This callback can / will be called multiple times)\r\n- `Watch` first calls `enqueue`, respecting caching preference, and then subscribes to `RealCache`'s changed keys with the queries `dependentKeys` (iff first `execute` is successful)\r\n- Have `CacheStore` return changed keys on write, `RealCache` aggregates and dispatches to subscribers\r\n- In subscribe, if dependent keys !disjoint to change keys, refetch watched query\r\n\r\nNote, this will add more logic bloat to `RealApolloCall`"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-android/issues/comments/285446432","html_url":"https://github.com/apollographql/apollo-android/issues/304#issuecomment-285446432","issue_url":"https://api.github.com/repos/apollographql/apollo-android/issues/304","id":285446432,"user":{"login":"sav007","id":902816,"avatar_url":"https://avatars1.githubusercontent.com/u/902816?v=3","gravatar_id":"","url":"https://api.github.com/users/sav007","html_url":"https://github.com/sav007","followers_url":"https://api.github.com/users/sav007/followers","following_url":"https://api.github.com/users/sav007/following{/other_user}","gists_url":"https://api.github.com/users/sav007/gists{/gist_id}","starred_url":"https://api.github.com/users/sav007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sav007/subscriptions","organizations_url":"https://api.github.com/users/sav007/orgs","repos_url":"https://api.github.com/users/sav007/repos","events_url":"https://api.github.com/users/sav007/events{/privacy}","received_events_url":"https://api.github.com/users/sav007/received_events","type":"User","site_admin":false},"created_at":"2017-03-09T18:59:40Z","updated_at":"2017-03-09T18:59:40Z","body":"Could you please elaborate more on `In subscribe, if dependent keys !disjoint to change keys, refetch watched query`. I thought if `ApolloCall` receives notification about dependentKeys changes that it depends on, then we refetch query"}}
{"actor":{"display_login":"sav007"}}