Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

GraphQL Query Return Posts in Production

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 Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.