I'm experimenting with an idea to create a site which mixes static with dynamic content, using Gatsby as the foundation. This hybrid site would contain static marketing pages available to the public as well as several dynamic pages which would exist behind an authentication wall. According to this tweet with @Gatsby, it's doable.
I'm stuck at step-1, adding an apollo provider, connecting the site to Graphcool.
Ordinarily, I would do this at the root like so, where App is the root of my site...
const networkInterface = createNetworkInterface({
uri: GRAPHCOOL_SIMPLE_ENDPOINT
});
const client = new ApolloClient({
networkInterface
});
export default ReactDOM.render(
<ApolloProvider client={client}>
<App />
</ApolloProvider>,
document.getElementById('root')
);
But where would the site's root be in a Gatsby site?