Skip to content

Instantly share code, notes, and snippets.

@youknowriad
Created Jan 7, 2017
Embed
What would you like to do?
GraphQL Provider
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