Closed lalmachado closed 4 years ago
@tolchai thank you so much for that.
I later realised you can't pass variables such as $uid
to staticQueries 😏
Solution for me was to load all of the data onto the page, instead of just the bit I needed, and then filter by the uid
which is available through the pageContext
. Seems a shame to have to do it that way but it works.
@LucyMac yeah, had to deal with the same problem and solved it with the filter as well. Not ideal for sure 🙂 There is an interesting discussion on the subject here - https://github.com/gatsbyjs/gatsby/issues/10482
Another solution would probably be just to use gatsby-source-prismic instead.
In case anyone runs into this problem:
gatsby-plugin-modal-routing does work together with gatsby-source-prismic-graphql, but it seems it is necessary to avoid using
It does work with
StaticQuery
so just use child components.