Been battling with an issue with Mux assets not working properly without running gatsby clean. Seems like the source plugin does not look for the document type SanityMuxVideo or SanityMuxVideoAsset when there is a cache. Temporarily fix available here: sanity-io/sanity-plugin-mux-input#57 (comment)
Would be great to find a more proper fix, but I find the codebase too complex to understand how to make sure these are queried properly.