如何在 Next.js 中将 withApollo HOC 放置在 _app 或 _document 级别

Tom*_*und 6 react-apollo next.js

我终于设法让 Next.js 中的 SSR 与 @apollo/react-hooks 一起工作,但目前我需要用 包装每个页面withApollo,例如:

export default withApollo(IndexPage)
Run Code Online (Sandbox Code Playgroud)

完整来源:https : //github.com/tomsoderlund/nextjs-graphql-hooks-boilerplate/blob/master/pages/articleList.js

如何将withApolloHOC提升到 _app.js 或 _document.js?