-
-
Save youknowriad/7678870bcb53520f1e6086c4bef82ec3 to your computer and use it in GitHub Desktop.
GraphQL Provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from 'react-dom'; | |
import { GraphProvider } from 'react-graphql-redux'; | |
import App from './app'; | |
// create your redux store | |
const store = // ... | |
// define your GraphQL schema and root (see above) | |
const { schema, root } = createGraph( store ); | |
// render your app wrapped in the GraphProvider | |
render( | |
<GraphProvider store={ store } schema={ schema } root={ root }> | |
<App /> | |
</GraphProvider> | |
, document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment