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?