fdb10d4f1d
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
19 lines
501 B
JavaScript
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)
|