next-with-apollo-hoc
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

next-with-apollo-hoc

Yet another next apollo hoc built on top of next-with-apollo

Example

// pages/_app.js
 
import React from 'react'
import App from 'next/app'
import withApollo from 'next-with-apollo-hoc'
import { StylesProvider } from '@material-ui/core/styles'
 
const graphqlURI = process.env.GRAPHQL_URI || 'http://localhost:5000/graphql'
 
export default withApollo({
  uri: graphqlURI,
  treeForData: tree => (
    <StylesProvider disableGeneration>
      {tree}
    </StylesProvider>
  ),
})(App)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i next-with-apollo-hoc

Weekly Downloads

3

Version

1.1.4

License

MIT

Unpacked Size

43.6 kB

Total Files

19

Last publish

Collaborators

  • pawsong