{"action":"opened","issue":{"url":"https://api.github.com/repos/apollographql/apollo-client/issues/3564","repository_url":"https://api.github.com/repos/apollographql/apollo-client","labels_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3564/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3564/comments","events_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3564/events","html_url":"https://github.com/apollographql/apollo-client/issues/3564","id":330925542,"node_id":"MDU6SXNzdWUzMzA5MjU1NDI=","number":3564,"title":"Partial cache reset","user":{"login":"BananaBobby","id":887379,"node_id":"MDQ6VXNlcjg4NzM3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/887379?v=4","gravatar_id":"","url":"https://api.github.com/users/BananaBobby","html_url":"https://github.com/BananaBobby","followers_url":"https://api.github.com/users/BananaBobby/followers","following_url":"https://api.github.com/users/BananaBobby/following{/other_user}","gists_url":"https://api.github.com/users/BananaBobby/gists{/gist_id}","starred_url":"https://api.github.com/users/BananaBobby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BananaBobby/subscriptions","organizations_url":"https://api.github.com/users/BananaBobby/orgs","repos_url":"https://api.github.com/users/BananaBobby/repos","events_url":"https://api.github.com/users/BananaBobby/events{/privacy}","received_events_url":"https://api.github.com/users/BananaBobby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-09T23:05:44Z","updated_at":"2018-06-09T23:05:44Z","closed_at":null,"author_association":"NONE","body":"I've got stuck with a rather common situation with mutations and cache.\r\nIn my case I have a query `tasks(filters: $filters)`. It gets fetched and cached several times with different filters. Then I run a mutation `createTask(input: $input)`. It looks like I can't update my cache manually in this case because I don't know for which filters I should update the cache unless I implement all task filtering logic inside of the update function. Additionally I've got another query that fetches the number of tasks opened which should also be updated.\r\n\r\nI've seen some issues in the repo and stackoverflow regarding the problem, but no solution found except for running `client.resetStore()`. Still it clears all the data and makes the app fetch it all right after. Possible solution that I see is providing a method for partial cache clear based on query names (may become a more abstract one keeping the idea), so that clearing `tasks` would clear all the tasks cache variants.\r\n\r\nIf you have any other thoughts on possible workaround - please share.\r\n\r\n<!--**Issue Labels**\r\n\r\nWhile not necessary, you can help organize our issues by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:\r\n\r\n- [ ] has-reproduction\r\n- [x] feature\r\n- [ ] docs\r\n- [ ] blocking\r\n- [ ] good first issue\r\n/label question\r\n\r\nTo add a label not listed above, simply place `/label another-label-name` on a line by itself.\r\n-->\r\n"}}
{"actor":{"display_login":"BananaBobby"}}