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
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.