Fix getInitialProps issue in with-apollo example (#8620)
* Fix getInitialProps in with-apollo example The code before had two design flaws: * When we skip WithApollo.getInitialProps we must hoist PageComponent.getInitialProps if it is present. * We should expose the apolloClient to underlying PageComponent.getInitialProps contexts. * Add abort check * Add some comments * Add client only example page https://github.com/zeit/next.js/pull/8620#issuecomment-527870886 * Remove connectToDevTools setting in favor default config https://github.com/apollographql/apollo-client/blob/7eaf4132cd2cd6244260777799406aaa03fcf377/packages/apollo-client/src/ApolloClient.ts#L170-L173 * Remove fetch check This is done by https://www.npmjs.com/package/isomorphic-unfetch * Remove apollo-boost I am removing this package, because we never actually used it. This is because we use the named export of apollo boost wich resolves to apollo-client. This way we removed apollo-link-state, apollo-link-error * Remove redirect code from the client
Showing
想要评论请 注册 或 登录