{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/820","repository_url":"https://api.github.com/repos/apollostack/apollo-client","labels_url":"https://api.github.com/repos/apollostack/apollo-client/issues/820/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-client/issues/820/comments","events_url":"https://api.github.com/repos/apollostack/apollo-client/issues/820/events","html_url":"https://github.com/apollostack/apollo-client/issues/820","id":184417385,"number":820,"title":"resetStore seems to fire an extra query","user":{"login":"andrewnoh","id":13257645,"avatar_url":"https://avatars.githubusercontent.com/u/13257645?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewnoh","html_url":"https://github.com/andrewnoh","followers_url":"https://api.github.com/users/andrewnoh/followers","following_url":"https://api.github.com/users/andrewnoh/following{/other_user}","gists_url":"https://api.github.com/users/andrewnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewnoh/subscriptions","organizations_url":"https://api.github.com/users/andrewnoh/orgs","repos_url":"https://api.github.com/users/andrewnoh/repos","events_url":"https://api.github.com/users/andrewnoh/events{/privacy}","received_events_url":"https://api.github.com/users/andrewnoh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-10-21T07:30:01Z","updated_at":"2016-11-16T23:59:15Z","closed_at":null,"body":"TestScreen (has `UserInfo` query on it) does this when I press logout: \n\n```\n  logout() {\n    const { client } = this.props;\n    Actions.login();  // react-native-flux-router: go back to login\n    AsyncStorage.multiRemove(['token1', 'token2']);\n    client.resetStore();\n  }\n```\n\nUser is sent back to the login screen (does not have `UserInfo` query on it):\n![screen shot 2016-10-21 at 3 22 33 am](https://cloud.githubusercontent.com/assets/13257645/19590087/08473f9a-973e-11e6-96ae-b06849d0f7fc.png)\n\n^ After this happens, the store is reset: `APOLLO_STORE_RESET`\n\nBut `UserInfo` query, which was only on TestScreen, ends up running again when I'm not even there anymore (I'm back at the login screen).\n![screen shot 2016-10-21 at 3 26 33 am](https://cloud.githubusercontent.com/assets/13257645/19590127/38077d30-973e-11e6-8704-0dc48412cd56.png)\n\nHere is the result when I don't resetStore (no extra query, so this makes me think it's coming from resetStore): \n![screen shot 2016-10-21 at 3 34 19 am](https://cloud.githubusercontent.com/assets/13257645/19590335/598f4374-973f-11e6-9e18-c744b1b4320f.png)\n"},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/comments/261112136","html_url":"https://github.com/apollostack/apollo-client/issues/820#issuecomment-261112136","issue_url":"https://api.github.com/repos/apollostack/apollo-client/issues/820","id":261112136,"user":{"login":"alexeygolev","id":1342730,"avatar_url":"https://avatars.githubusercontent.com/u/1342730?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeygolev","html_url":"https://github.com/alexeygolev","followers_url":"https://api.github.com/users/alexeygolev/followers","following_url":"https://api.github.com/users/alexeygolev/following{/other_user}","gists_url":"https://api.github.com/users/alexeygolev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeygolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeygolev/subscriptions","organizations_url":"https://api.github.com/users/alexeygolev/orgs","repos_url":"https://api.github.com/users/alexeygolev/repos","events_url":"https://api.github.com/users/alexeygolev/events{/privacy}","received_events_url":"https://api.github.com/users/alexeygolev/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T23:59:15Z","updated_at":"2016-11-16T23:59:15Z","body":"Same situation with (not native) react and react-router. In fact we're just following the auth example from the docs. We do resetState and redirect to login. We even tried to resetState on login page (in case there is a race condition)"}}
{"actor":{"display_login":"alexeygolev"}}