{"action":"closed","number":8620,"pull_request":{"url":"https://api.github.com/repos/zeit/next.js/pulls/8620","id":313930608,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEzOTMwNjA4","html_url":"https://github.com/zeit/next.js/pull/8620","diff_url":"https://github.com/zeit/next.js/pull/8620.diff","patch_url":"https://github.com/zeit/next.js/pull/8620.patch","issue_url":"https://api.github.com/repos/zeit/next.js/issues/8620","number":8620,"state":"closed","locked":false,"title":"Fix getInitialProps issue in with-apollo example","user":{"login":"HaNdTriX","id":1265681,"node_id":"MDQ6VXNlcjEyNjU2ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1265681?v=4","gravatar_id":"","url":"https://api.github.com/users/HaNdTriX","html_url":"https://github.com/HaNdTriX","followers_url":"https://api.github.com/users/HaNdTriX/followers","following_url":"https://api.github.com/users/HaNdTriX/following{/other_user}","gists_url":"https://api.github.com/users/HaNdTriX/gists{/gist_id}","starred_url":"https://api.github.com/users/HaNdTriX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaNdTriX/subscriptions","organizations_url":"https://api.github.com/users/HaNdTriX/orgs","repos_url":"https://api.github.com/users/HaNdTriX/repos","events_url":"https://api.github.com/users/HaNdTriX/events{/privacy}","received_events_url":"https://api.github.com/users/HaNdTriX/received_events","type":"User","site_admin":false},"body":"## Motivation\r\n\r\nThe code before had three design flaws:\r\n\r\n* When we skip `WithApollo.getInitialProps` we [must hoist](https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over) `PageComponent.getInitialProps` **if** it is present. (Special thanks to @justinnipper for pointing me into the right direction 🙏.)\r\n* We should expose the `apolloClient` to the underlying `PageComponent.getInitialProps` contexts. This way users are able to use apollo inside `PageComponent.getInitialProps` to perform prerender redirects or similar. (e.g. `await ctx.apolloClient.query(...)`)\r\n* We used the apollo-boost package wich was optimized for client-usage.\r\n\r\n## Changelog\r\n\r\n- Fix getInitialProps hoisting\r\n- Expose apolloClient in `pageContext`\r\n- Disable connectToDevTools in production\r\n- Remove apollo-boost package\r\n- Remove author entry from package.json\r\n- Simplify fetch polyfill\r\n- Add redirect abort check\r\n- Added no-ssr example\r\n- Added some docs\r\n\r\n**Status:** ready\r\n**Related:** #8508, #8504\r\n","created_at":"2019-09-04T09:00:05Z","updated_at":"2019-09-04T16:46:40Z","closed_at":"2019-09-04T16:46:40Z","merged_at":"2019-09-04T16:46:40Z","merge_commit_sha":"cba5c05b36b05da77760b38d93303a1f18d5b2b5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Timer","id":616428,"node_id":"MDQ6VXNlcjYxNjQyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/616428?v=4","gravatar_id":"","url":"https://api.github.com/users/Timer","html_url":"https://github.com/Timer","followers_url":"https://api.github.com/users/Timer/followers","following_url":"https://api.github.com/users/Timer/following{/other_user}","gists_url":"https://api.github.com/users/Timer/gists{/gist_id}","starred_url":"https://api.github.com/users/Timer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timer/subscriptions","organizations_url":"https://api.github.com/users/Timer/orgs","repos_url":"https://api.github.com/users/Timer/repos","events_url":"https://api.github.com/users/Timer/events{/privacy}","received_events_url":"https://api.github.com/users/Timer/received_events","type":"User","site_admin":false},{"login":"lfades","id":4278345,"node_id":"MDQ6VXNlcjQyNzgzNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4278345?v=4","gravatar_id":"","url":"https://api.github.com/users/lfades","html_url":"https://github.com/lfades","followers_url":"https://api.github.com/users/lfades/followers","following_url":"https://api.github.com/users/lfades/following{/other_user}","gists_url":"https://api.github.com/users/lfades/gists{/gist_id}","starred_url":"https://api.github.com/users/lfades/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfades/subscriptions","organizations_url":"https://api.github.com/users/lfades/orgs","repos_url":"https://api.github.com/users/lfades/repos","events_url":"https://api.github.com/users/lfades/events{/privacy}","received_events_url":"https://api.github.com/users/lfades/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zeit/next.js/pulls/8620/commits","review_comments_url":"https://api.github.com/repos/zeit/next.js/pulls/8620/comments","review_comment_url":"https://api.github.com/repos/zeit/next.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/8620/comments","statuses_url":"https://api.github.com/repos/zeit/next.js/statuses/73f6e04b6bfe02c95eeffd7d113eedcb82da9300","head":{"label":"HaNdTriX:examples/with-apollo","ref":"examples/with-apollo","sha":"73f6e04b6bfe02c95eeffd7d113eedcb82da9300","user":{"login":"HaNdTriX","id":1265681,"node_id":"MDQ6VXNlcjEyNjU2ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1265681?v=4","gravatar_id":"","url":"https://api.github.com/users/HaNdTriX","html_url":"https://github.com/HaNdTriX","followers_url":"https://api.github.com/users/HaNdTriX/followers","following_url":"https://api.github.com/users/HaNdTriX/following{/other_user}","gists_url":"https://api.github.com/users/HaNdTriX/gists{/gist_id}","starred_url":"https://api.github.com/users/HaNdTriX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaNdTriX/subscriptions","organizations_url":"https://api.github.com/users/HaNdTriX/orgs","repos_url":"https://api.github.com/users/HaNdTriX/repos","events_url":"https://api.github.com/users/HaNdTriX/events{/privacy}","received_events_url":"https://api.github.com/users/HaNdTriX/received_events","type":"User","site_admin":false},"repo":{"id":85327048,"node_id":"MDEwOlJlcG9zaXRvcnk4NTMyNzA0OA==","name":"next.js","full_name":"HaNdTriX/next.js","private":false,"owner":{"login":"HaNdTriX","id":1265681,"node_id":"MDQ6VXNlcjEyNjU2ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1265681?v=4","gravatar_id":"","url":"https://api.github.com/users/HaNdTriX","html_url":"https://github.com/HaNdTriX","followers_url":"https://api.github.com/users/HaNdTriX/followers","following_url":"https://api.github.com/users/HaNdTriX/following{/other_user}","gists_url":"https://api.github.com/users/HaNdTriX/gists{/gist_id}","starred_url":"https://api.github.com/users/HaNdTriX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaNdTriX/subscriptions","organizations_url":"https://api.github.com/users/HaNdTriX/orgs","repos_url":"https://api.github.com/users/HaNdTriX/repos","events_url":"https://api.github.com/users/HaNdTriX/events{/privacy}","received_events_url":"https://api.github.com/users/HaNdTriX/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HaNdTriX/next.js","description":"Framework for server-rendered React apps","fork":true,"url":"https://api.github.com/repos/HaNdTriX/next.js","forks_url":"https://api.github.com/repos/HaNdTriX/next.js/forks","keys_url":"https://api.github.com/repos/HaNdTriX/next.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HaNdTriX/next.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HaNdTriX/next.js/teams","hooks_url":"https://api.github.com/repos/HaNdTriX/next.js/hooks","issue_events_url":"https://api.github.com/repos/HaNdTriX/next.js/issues/events{/number}","events_url":"https://api.github.com/repos/HaNdTriX/next.js/events","assignees_url":"https://api.github.com/repos/HaNdTriX/next.js/assignees{/user}","branches_url":"https://api.github.com/repos/HaNdTriX/next.js/branches{/branch}","tags_url":"https://api.github.com/repos/HaNdTriX/next.js/tags","blobs_url":"https://api.github.com/repos/HaNdTriX/next.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HaNdTriX/next.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HaNdTriX/next.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/HaNdTriX/next.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HaNdTriX/next.js/statuses/{sha}","languages_url":"https://api.github.com/repos/HaNdTriX/next.js/languages","stargazers_url":"https://api.github.com/repos/HaNdTriX/next.js/stargazers","contributors_url":"https://api.github.com/repos/HaNdTriX/next.js/contributors","subscribers_url":"https://api.github.com/repos/HaNdTriX/next.js/subscribers","subscription_url":"https://api.github.com/repos/HaNdTriX/next.js/subscription","commits_url":"https://api.github.com/repos/HaNdTriX/next.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/HaNdTriX/next.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/HaNdTriX/next.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/HaNdTriX/next.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/HaNdTriX/next.js/contents/{+path}","compare_url":"https://api.github.com/repos/HaNdTriX/next.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HaNdTriX/next.js/merges","archive_url":"https://api.github.com/repos/HaNdTriX/next.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HaNdTriX/next.js/downloads","issues_url":"https://api.github.com/repos/HaNdTriX/next.js/issues{/number}","pulls_url":"https://api.github.com/repos/HaNdTriX/next.js/pulls{/number}","milestones_url":"https://api.github.com/repos/HaNdTriX/next.js/milestones{/number}","notifications_url":"https://api.github.com/repos/HaNdTriX/next.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HaNdTriX/next.js/labels{/name}","releases_url":"https://api.github.com/repos/HaNdTriX/next.js/releases{/id}","deployments_url":"https://api.github.com/repos/HaNdTriX/next.js/deployments","created_at":"2017-03-17T15:30:04Z","updated_at":"2018-09-30T23:01:02Z","pushed_at":"2019-09-04T14:25:35Z","git_url":"git://github.com/HaNdTriX/next.js.git","ssh_url":"git@github.com:HaNdTriX/next.js.git","clone_url":"https://github.com/HaNdTriX/next.js.git","svn_url":"https://github.com/HaNdTriX/next.js","homepage":"https://zeit.co/blog/next","size":15169,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":4,"default_branch":"canary"}},"base":{"label":"zeit:canary","ref":"canary","sha":"2ba352da39ee00b6595aecdc9ffb2f103e803a85","user":{"login":"zeit","id":14985020,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTg1MDIw","avatar_url":"https://avatars0.githubusercontent.com/u/14985020?v=4","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"repo":{"id":70107786,"node_id":"MDEwOlJlcG9zaXRvcnk3MDEwNzc4Ng==","name":"next.js","full_name":"zeit/next.js","private":false,"owner":{"login":"zeit","id":14985020,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTg1MDIw","avatar_url":"https://avatars0.githubusercontent.com/u/14985020?v=4","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/zeit/next.js","description":"The React Framework","fork":false,"url":"https://api.github.com/repos/zeit/next.js","forks_url":"https://api.github.com/repos/zeit/next.js/forks","keys_url":"https://api.github.com/repos/zeit/next.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeit/next.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeit/next.js/teams","hooks_url":"https://api.github.com/repos/zeit/next.js/hooks","issue_events_url":"https://api.github.com/repos/zeit/next.js/issues/events{/number}","events_url":"https://api.github.com/repos/zeit/next.js/events","assignees_url":"https://api.github.com/repos/zeit/next.js/assignees{/user}","branches_url":"https://api.github.com/repos/zeit/next.js/branches{/branch}","tags_url":"https://api.github.com/repos/zeit/next.js/tags","blobs_url":"https://api.github.com/repos/zeit/next.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeit/next.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeit/next.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeit/next.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeit/next.js/statuses/{sha}","languages_url":"https://api.github.com/repos/zeit/next.js/languages","stargazers_url":"https://api.github.com/repos/zeit/next.js/stargazers","contributors_url":"https://api.github.com/repos/zeit/next.js/contributors","subscribers_url":"https://api.github.com/repos/zeit/next.js/subscribers","subscription_url":"https://api.github.com/repos/zeit/next.js/subscription","commits_url":"https://api.github.com/repos/zeit/next.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeit/next.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeit/next.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeit/next.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeit/next.js/contents/{+path}","compare_url":"https://api.github.com/repos/zeit/next.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeit/next.js/merges","archive_url":"https://api.github.com/repos/zeit/next.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeit/next.js/downloads","issues_url":"https://api.github.com/repos/zeit/next.js/issues{/number}","pulls_url":"https://api.github.com/repos/zeit/next.js/pulls{/number}","milestones_url":"https://api.github.com/repos/zeit/next.js/milestones{/number}","notifications_url":"https://api.github.com/repos/zeit/next.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeit/next.js/labels{/name}","releases_url":"https://api.github.com/repos/zeit/next.js/releases{/id}","deployments_url":"https://api.github.com/repos/zeit/next.js/deployments","created_at":"2016-10-05T23:32:51Z","updated_at":"2019-09-04T16:00:12Z","pushed_at":"2019-09-04T16:46:40Z","git_url":"git://github.com/zeit/next.js.git","ssh_url":"git@github.com:zeit/next.js.git","clone_url":"https://github.com/zeit/next.js.git","svn_url":"https://github.com/zeit/next.js","homepage":"https://nextjs.org","size":15365,"stargazers_count":40560,"watchers_count":40560,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5139,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":263,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5139,"open_issues":263,"watchers":40560,"default_branch":"canary"}},"_links":{"self":{"href":"https://api.github.com/repos/zeit/next.js/pulls/8620"},"html":{"href":"https://github.com/zeit/next.js/pull/8620"},"issue":{"href":"https://api.github.com/repos/zeit/next.js/issues/8620"},"comments":{"href":"https://api.github.com/repos/zeit/next.js/issues/8620/comments"},"review_comments":{"href":"https://api.github.com/repos/zeit/next.js/pulls/8620/comments"},"review_comment":{"href":"https://api.github.com/repos/zeit/next.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zeit/next.js/pulls/8620/commits"},"statuses":{"href":"https://api.github.com/repos/zeit/next.js/statuses/73f6e04b6bfe02c95eeffd7d113eedcb82da9300"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ijjk","id":22380829,"node_id":"MDQ6VXNlcjIyMzgwODI5","avatar_url":"https://avatars0.githubusercontent.com/u/22380829?v=4","gravatar_id":"","url":"https://api.github.com/users/ijjk","html_url":"https://github.com/ijjk","followers_url":"https://api.github.com/users/ijjk/followers","following_url":"https://api.github.com/users/ijjk/following{/other_user}","gists_url":"https://api.github.com/users/ijjk/gists{/gist_id}","starred_url":"https://api.github.com/users/ijjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijjk/subscriptions","organizations_url":"https://api.github.com/users/ijjk/orgs","repos_url":"https://api.github.com/users/ijjk/repos","events_url":"https://api.github.com/users/ijjk/events{/privacy}","received_events_url":"https://api.github.com/users/ijjk/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":8,"additions":124,"deletions":47,"changed_files":7}}
{"actor":{"display_login":"ijjk"}}