I'm integrating Apollo Client into Gatsby v2 beta, but I was curious if there was a root component. For example, in create-react-app, you can have an App component that all the other ones run out of.
I want to add ApolloProvider so that its context can be accessed throughout all the pages and components being served. Here's the section of the getting started that introduces it. Where do you think it should go?
I think what you need is wrapRootElement. It exists both for gatsby-browser.js and gatsby-ssr.js.
That's exactly it, didn't know that existed. Thanks!
Most helpful comment
I think what you need is wrapRootElement. It exists both for
gatsby-browser.jsandgatsby-ssr.js.