rsnext/examples/with-graphql-react/pages/_app.js
laiso fdb10d4f1d Update to Next v8.0 example on with-graphql-react (#6454)
I'm working on examples/with-graphql-react changes to:
- Next v7 to v8.0 and update dependencies
- fix some errors for the change of graphql-react API
2019-02-26 23:44:45 +01:00

19 lines
501 B
JavaScript

import 'cross-fetch/polyfill'
import { GraphQLContext } from 'graphql-react'
import { withGraphQLApp } from 'next-graphql-react'
import App, { Container } from 'next/app'
class CustomApp extends App {
render () {
const { Component, pageProps, graphql } = this.props
return (
<Container>
<GraphQLContext.Provider value={graphql}>
<Component {...pageProps} />
</GraphQLContext.Provider>
</Container>
)
}
}
export default withGraphQLApp(CustomApp)