{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/874","repository_url":"https://api.github.com/repos/apollostack/apollo-client","labels_url":"https://api.github.com/repos/apollostack/apollo-client/issues/874/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-client/issues/874/comments","events_url":"https://api.github.com/repos/apollostack/apollo-client/issues/874/events","html_url":"https://github.com/apollostack/apollo-client/pull/874","id":187493064,"number":874,"title":"Safe Apollo Reducers that can't crash the store","user":{"login":"rricard","id":246520,"avatar_url":"https://avatars.githubusercontent.com/u/246520?v=3","gravatar_id":"","url":"https://api.github.com/users/rricard","html_url":"https://github.com/rricard","followers_url":"https://api.github.com/users/rricard/followers","following_url":"https://api.github.com/users/rricard/following{/other_user}","gists_url":"https://api.github.com/users/rricard/gists{/gist_id}","starred_url":"https://api.github.com/users/rricard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rricard/subscriptions","organizations_url":"https://api.github.com/users/rricard/orgs","repos_url":"https://api.github.com/users/rricard/repos","events_url":"https://api.github.com/users/rricard/events{/privacy}","received_events_url":"https://api.github.com/users/rricard/received_events","type":"User","site_admin":false},"labels":[{"id":386214571,"url":"https://api.github.com/repos/apollostack/apollo-client/labels/ready","name":"ready","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":{"login":"rricard","id":246520,"avatar_url":"https://avatars.githubusercontent.com/u/246520?v=3","gravatar_id":"","url":"https://api.github.com/users/rricard","html_url":"https://github.com/rricard","followers_url":"https://api.github.com/users/rricard/followers","following_url":"https://api.github.com/users/rricard/following{/other_user}","gists_url":"https://api.github.com/users/rricard/gists{/gist_id}","starred_url":"https://api.github.com/users/rricard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rricard/subscriptions","organizations_url":"https://api.github.com/users/rricard/orgs","repos_url":"https://api.github.com/users/rricard/repos","events_url":"https://api.github.com/users/rricard/events{/privacy}","received_events_url":"https://api.github.com/users/rricard/received_events","type":"User","site_admin":false},"assignees":[{"login":"rricard","id":246520,"avatar_url":"https://avatars.githubusercontent.com/u/246520?v=3","gravatar_id":"","url":"https://api.github.com/users/rricard","html_url":"https://github.com/rricard","followers_url":"https://api.github.com/users/rricard/followers","following_url":"https://api.github.com/users/rricard/following{/other_user}","gists_url":"https://api.github.com/users/rricard/gists{/gist_id}","starred_url":"https://api.github.com/users/rricard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rricard/subscriptions","organizations_url":"https://api.github.com/users/rricard/orgs","repos_url":"https://api.github.com/users/rricard/repos","events_url":"https://api.github.com/users/rricard/events{/privacy}","received_events_url":"https://api.github.com/users/rricard/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-11-05T12:01:18Z","updated_at":"2016-12-01T15:46:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apollostack/apollo-client/pulls/874","html_url":"https://github.com/apollostack/apollo-client/pull/874","diff_url":"https://github.com/apollostack/apollo-client/pull/874.diff","patch_url":"https://github.com/apollostack/apollo-client/pull/874.patch"},"body":"<!--\r\n  Thanks for filing a pull request on Apollo Client!\r\n\r\n  Please look at the following checklist to ensure that your PR\r\n  can be accepted quickly:\r\n-->\r\n\r\nTODO:\r\n\r\n- [x] If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)\r\n- [x] Make sure all of the significant new logic is covered by tests\r\n- [x] Rebase your changes on master so that they can be merged easily\r\n- [x] Make sure all tests and linter rules pass\r\n- [x] Update CHANGELOG.md with your change\r\n- [x] Add your name and email to the AUTHORS file (optional)\r\n- [x] If this was a change that affects the external API, update the docs and post a link to the PR in the discussion\r\n\r\nWe prevent throwing inside the reducer by wrapping it in a try/catch block. The error will still be reported to the user."},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/comments/264208501","html_url":"https://github.com/apollostack/apollo-client/pull/874#issuecomment-264208501","issue_url":"https://api.github.com/repos/apollostack/apollo-client/issues/874","id":264208501,"user":{"login":"helfer","id":6569980,"avatar_url":"https://avatars.githubusercontent.com/u/6569980?v=3","gravatar_id":"","url":"https://api.github.com/users/helfer","html_url":"https://github.com/helfer","followers_url":"https://api.github.com/users/helfer/followers","following_url":"https://api.github.com/users/helfer/following{/other_user}","gists_url":"https://api.github.com/users/helfer/gists{/gist_id}","starred_url":"https://api.github.com/users/helfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfer/subscriptions","organizations_url":"https://api.github.com/users/helfer/orgs","repos_url":"https://api.github.com/users/helfer/repos","events_url":"https://api.github.com/users/helfer/events{/privacy}","received_events_url":"https://api.github.com/users/helfer/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T15:46:53Z","updated_at":"2016-12-01T15:46:53Z","body":"@rricard I just tried adding a warning, which made me realize that errors that are not Apollo Client internal errors are actually possible in the reducers, which means that the error is more likely due to code that the user wrote than due to code that we wrote. Concrete examples:\r\n\r\n- `dataIdFromObject` that starts with a $ character.\r\n- replacing a real id node in the store with a generated id node\r\n\r\nFor that reason I will not add a warning and simply merge the PR as it is now :tada:"}}
{"actor":{"display_login":"helfer"}}