GraphQL query returning empty posts in production, but not in dev

3 replies
Last updated: Jul 3, 2020
Ever had a GraphQL query return posts in dev and be empty in production...? New weird one today.
Jul 2, 2020, 4:01 PM
using watchMode and overlayDrafts in dev environment could do that (if you had posts drafted but not published)
Jul 2, 2020, 8:59 PM
Hmm. The same posts appear elsewhere on the site. But they just won’t render in this one page type.
Jul 2, 2020, 9:08 PM
Update: For some reason
in my GraphQL was returning empty on Netlify’s build, but not locally, in gatsby build, or gatsby dev, or with netlify dev. Weird!
Had to just query everything and filter out from the results manually.
Jul 3, 2020, 6:37 AM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the 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?

Categorized in