GraphQL query works in Gatsby page but not inside class component
问题 There have been a couple of similar questions, but none helped me really understand using a GraphQL inside a (class) component other than the ones in the pages folder. My project structure looks like that: -src --components ---aboutBody ----index.js --pages ---about.js I have a page component called about (Prismic single page type) and set up some components to "fill" this page (cleaned up for better readability). class AboutPage extends Component { render() { return ( <LayoutDefault>