Excellent tutorial Hunter! Quick question, if you don't mind. Why does the pageQuery const need to be exported? Is this simply how Gatsby-image accesses the query? Thanks!
Yes, that's how the component is able to consume the GraphQL query. I think it needs to be exported because that's how Gatsby is able to process it during the build. Check out this page for more info: gatsbyjs.org/docs/page-query
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Excellent tutorial Hunter! Quick question, if you don't mind. Why does the
pageQuery
const need to be exported? Is this simply howGatsby-image
accesses the query? Thanks!Yes, that's how the component is able to consume the GraphQL query. I think it needs to be exported because that's how Gatsby is able to process it during the build. Check out this page for more info: gatsbyjs.org/docs/page-query