{"action":"created","issue":{"url":"https://api.github.com/repos/FormidableLabs/urql/issues/76","repository_url":"https://api.github.com/repos/FormidableLabs/urql","labels_url":"https://api.github.com/repos/FormidableLabs/urql/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/FormidableLabs/urql/issues/76/comments","events_url":"https://api.github.com/repos/FormidableLabs/urql/issues/76/events","html_url":"https://github.com/FormidableLabs/urql/pull/76","id":321340350,"number":76,"title":"WIP: Fix cache not invalidating when a Client component isn't listening","user":{"login":"kitten","id":2041385,"avatar_url":"https://avatars0.githubusercontent.com/u/2041385?v=4","gravatar_id":"","url":"https://api.github.com/users/kitten","html_url":"https://github.com/kitten","followers_url":"https://api.github.com/users/kitten/followers","following_url":"https://api.github.com/users/kitten/following{/other_user}","gists_url":"https://api.github.com/users/kitten/gists{/gist_id}","starred_url":"https://api.github.com/users/kitten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitten/subscriptions","organizations_url":"https://api.github.com/users/kitten/orgs","repos_url":"https://api.github.com/users/kitten/repos","events_url":"https://api.github.com/users/kitten/events{/privacy}","received_events_url":"https://api.github.com/users/kitten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T20:44:32Z","updated_at":"2018-05-08T20:50:17Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/FormidableLabs/urql/pulls/76","html_url":"https://github.com/FormidableLabs/urql/pull/76","diff_url":"https://github.com/FormidableLabs/urql/pull/76.diff","patch_url":"https://github.com/FormidableLabs/urql/pull/76.patch"},"body":"Fix #58\r\n\r\nSuppose a Client component fetches some data and is then unmounted, its\r\nresponse will still remain cached. When a mutation is then performed\r\nthat invalidates its data, the component is not mounted to invalidate\r\nthis response itself. Instead it will render with the stale, cached\r\nresponse.\r\n\r\nTo prevent this change introduces a secondary cache control. This\r\ncontrol keeps track of typenames as well in the cacheExchange. It maps\r\ntypenames to operation keys (which are also cache keys, woohoo!). When\r\na mutation then invalidates a couple of typenames in the cache, the\r\ncacheExchange can go ahead and look up all cache keys that should be\r\ninvalidated, all while the Client component can stay unmounted."},"comment":{"url":"https://api.github.com/repos/FormidableLabs/urql/issues/comments/387538100","html_url":"https://github.com/FormidableLabs/urql/pull/76#issuecomment-387538100","issue_url":"https://api.github.com/repos/FormidableLabs/urql/issues/76","id":387538100,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T20:50:17Z","updated_at":"2018-05-08T20:50:17Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/16891943/badge)](https://coveralls.io/builds/16891943)\n\nCoverage increased (+0.3%) to 93.679% when pulling **fcfbebd208963c9842352dc57e321d5747ef16c4 on fix/unknown-stale-cache** into **d833d4c14cb101ec250d5f19e5dbb6cbad44e8ae on next**.\n"}}
{"actor":{"display_login":"coveralls"}}