In gatsbyJS there is a way to specify page level queries but from whatever i've read only way to pass params to the gatsby query is when creating the page (via page context).
For example, below $slug is passed to the page when creating it. Is there another way to pass $slug (maybe via a query param value).
export const query = graphql`
query($slug: String) {
mdx(frontmatter: {slug: { eq: $slug }}) {
frontmatter {
title
author
}
body
}
}
`;