rsnext/examples/with-graphql-react/pages/_app.js
Jayden Seric 9fea9dbe6d
Update the with-graphql-react example (#13928)
- Removed the manual `fetch` polyfill as that is handled automatically by Next.js now.
- Updated dependencies, including [`graphql-react`](https://github.com/jaydenseric/graphql-react) and [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
- Removed `next.config.js` as it’s no longer required for [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
- Renamed the index page component from `Home` to `IndexPage`.
- Tweaked the [`graphql-react`](https://github.com/jaydenseric/graphql-react) bundle size mentioned in the readme.
2020-06-09 18:06:19 +00:00

10 lines
284 B
JavaScript

import { GraphQLProvider } from 'graphql-react'
import { withGraphQLApp } from 'next-graphql-react'
const App = ({ Component, pageProps, graphql }) => (
<GraphQLProvider graphql={graphql}>
<Component {...pageProps} />
</GraphQLProvider>
)
export default withGraphQLApp(App)