{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/react-apollo/issues/488","repository_url":"https://api.github.com/repos/apollographql/react-apollo","labels_url":"https://api.github.com/repos/apollographql/react-apollo/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/react-apollo/issues/488/comments","events_url":"https://api.github.com/repos/apollographql/react-apollo/issues/488/events","html_url":"https://github.com/apollographql/react-apollo/pull/488","id":210363641,"number":488,"title":"Ensure that SSR completes when the GraphQL server throws errors.","user":{"login":"tmeasday","id":132554,"avatar_url":"https://avatars2.githubusercontent.com/u/132554?v=3","gravatar_id":"","url":"https://api.github.com/users/tmeasday","html_url":"https://github.com/tmeasday","followers_url":"https://api.github.com/users/tmeasday/followers","following_url":"https://api.github.com/users/tmeasday/following{/other_user}","gists_url":"https://api.github.com/users/tmeasday/gists{/gist_id}","starred_url":"https://api.github.com/users/tmeasday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmeasday/subscriptions","organizations_url":"https://api.github.com/users/tmeasday/orgs","repos_url":"https://api.github.com/users/tmeasday/repos","events_url":"https://api.github.com/users/tmeasday/events{/privacy}","received_events_url":"https://api.github.com/users/tmeasday/received_events","type":"User","site_admin":false},"labels":[{"id":388706500,"url":"https://api.github.com/repos/apollographql/react-apollo/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-27T00:43:31Z","updated_at":"2017-03-06T14:45:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apollographql/react-apollo/pulls/488","html_url":"https://github.com/apollographql/react-apollo/pull/488","diff_url":"https://github.com/apollographql/react-apollo/pull/488.diff","patch_url":"https://github.com/apollographql/react-apollo/pull/488.patch"},"body":"See #406.\r\n\r\nWe still end up rendering a loading screen but that is better than\r\njust bailing out of SSR completely.\r\n\r\n\r\nTODO:\r\n\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- [ ] Update CHANGELOG.md with your change\r\n"},"comment":{"url":"https://api.github.com/repos/apollographql/react-apollo/issues/comments/284415525","html_url":"https://github.com/apollographql/react-apollo/pull/488#issuecomment-284415525","issue_url":"https://api.github.com/repos/apollographql/react-apollo/issues/488","id":284415525,"user":{"login":"calebmer","id":8282507,"avatar_url":"https://avatars2.githubusercontent.com/u/8282507?v=3","gravatar_id":"","url":"https://api.github.com/users/calebmer","html_url":"https://github.com/calebmer","followers_url":"https://api.github.com/users/calebmer/followers","following_url":"https://api.github.com/users/calebmer/following{/other_user}","gists_url":"https://api.github.com/users/calebmer/gists{/gist_id}","starred_url":"https://api.github.com/users/calebmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebmer/subscriptions","organizations_url":"https://api.github.com/users/calebmer/orgs","repos_url":"https://api.github.com/users/calebmer/repos","events_url":"https://api.github.com/users/calebmer/events{/privacy}","received_events_url":"https://api.github.com/users/calebmer/received_events","type":"User","site_admin":false},"created_at":"2017-03-06T14:45:09Z","updated_at":"2017-03-06T14:45:09Z","body":"@tmeasday \r\n\r\n> Are you saying a patch to AC to \"reuse\" errored queries?\r\n\r\nYes, that is what I meant. Sorry for lacking clarity 😊\r\n\r\n> Maybe we could repurpose the one from next.js?\r\n\r\nI didn’t know Next.js was using a custom renderer! Do you have a link? 😊\r\n\r\nIf they are then it would be much easier for us to reach the ideal SSR implementation then I thought. If you want to open an issue for that this may be worth discussing.\r\n\r\n> If that is correct then it's a question of which limitation we'd prefer to accept; treating all SSR errors as critical w/ no way to continue; or treating none as critical and confusingly rendering loading states on the server.\r\n\r\nIf we keep things as they are there is nothing stopping users from ignoring the error and rendering loading states. They would just call `getDataFromTree(...).catch(() => { /* noop */ })`. To make this possible we should replace [`Promise.all`](https://github.com/apollographql/react-apollo/pull/488/files#diff-916156c481141bfcd08c6ae40ce10e00R139) with a custom implementation that only resolves if _all_ the promises have either resolved or rejected. `Promise.all` currently ends early if one of the promises rejected. We may also want to collect all of the rejects and throw an array of errors (or an error with the property `queryErrors`), so the user has access to all the errors and not just the first. What do you think about modifying this PR to implement that behavior which would allow the user to choose between both ends of the spectrum and/or switch depending on the criticality of the error?"}}
{"actor":{"display_login":"calebmer"}}