Join our next Developer Virtual Meetup – Live Q&A, Project Showcase, Swag raffle, and more 🔥

GraphQL query resolving references on a _raw field in Gatsby

2 replies
Last updated: May 17, 2022
Hey all, if within a gatsby project I remove the node_modules and reinstall them I must clear the gatsby cache in order for Mux video to work. I've noticed that when using the GraphiQL interface and I do a graphQL query resolving references on a _raw field if I don't clear the cache the reference then the 'asset' comes back null. As soon as I
gatsby clean
and re-run the same query, the 'asset' field gets populated with all the mux data.
Anyone any idea why this might be happening?
May 17, 2022, 9:15 AM
I’ve also been having this problem, I think it’s a bug in version
as downgrading to
seems to solve it for me. Someone else has opened an issue on Github about this too:
May 17, 2022, 11:20 AM
Thanks Simon. I'll take a look.
May 17, 2022, 8:01 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?