Data sourced from API not appearing even after clearing cache

I’ve been building a site with NextJS and datocms, and was seemingly having no issues sourcing data from the graphql api. But when I got to the blog portion of the site, my queries for posts were coming up undefined. So I of course deleted the .next cache and tried again, and after doing a few rounds of this, suddenly my “homepage” content type suddenly started to show up as undefined as well. I would think it was something to do with the API being down, but other content types are working as expected.
Pretty confused by this one, I haven’t had with this issue with other headless cms before.

Hi @mandy, welcome to the Dato forum!

Are you using the latest version of Next.js? If so, have you tried opting out of Next’s fetch cache to see if that helps at all?

If not, could you please provide some sample code so we can see what’s going on?