Issues with API content updates not reflecting in Sanity UI or GROQ queries

23 replies
Last updated: Nov 9, 2021
has anyone ever experienced an issue where no content updates will come through your API, but they are visible in the Desk/Vision UI both locally and sanity hosted, and the UI inspector?
Nov 9, 2021, 1:11 AM
This usually happens if a site is statically generated and needs a new build triggered in order to display new content.
Nov 9, 2021, 1:20 AM
user M
thanks. I'm using NextJS and I've running the new builds, but it actually doesn't show as updated in vision or hitting the API directly in the browser or using a REST client
Nov 9, 2021, 1:43 AM
I'm trying to figure out if there is a way to see all data, deleted or otherwise
Nov 9, 2021, 1:47 AM
I'm trying to figure out if there is a way to see all data, deleted or otherwise
Nov 9, 2021, 1:47 AM
and if there is a way to force pulling the latest data
Nov 9, 2021, 1:47 AM
Ah, I thought you had said that changes were showing up in Vision in your first post.
Nov 9, 2021, 1:47 AM
😬 my bad, i meant to say they were not showing up. I'll updated that
Nov 9, 2021, 1:50 AM
oh wait no, yeah they show up when inspecting the post in the Sanity UI, but not when pulling through an API/GROQ query
Nov 9, 2021, 1:51 AM
Hmm, have you double checked that the changes are published and not in drafts mode?
Nov 9, 2021, 1:52 AM
for example, here the "slug" and "mainImage" is there
Nov 9, 2021, 1:56 AM
but here, when running a groq query they are both null. Yes fully published and pulling from the same dataset.
Nov 9, 2021, 1:58 AM
but here, when running a groq query they are both null. Yes fully published and pulling from the same dataset.
Nov 9, 2021, 1:58 AM
If you set the api to v03-25-2021 does it work?
Nov 9, 2021, 2:00 AM
nope
Nov 9, 2021, 2:00 AM
that's what I have it set to normally
Nov 9, 2021, 2:00 AM
basically after i created this post, maybe i did something to break sync between the CMS and the API that gets generated from it because not post updates show for any posts and no new ones will show up.
Nov 9, 2021, 2:01 AM
The
_type == 'review'
might be stale documents from work done in the past? I’ve done that with
post
and
posts
.
Nov 9, 2021, 2:03 AM
GASPS
Nov 9, 2021, 2:04 AM
oh my goodness
Nov 9, 2021, 2:04 AM
first, good eye. second, it's a mistake I've made on other things (we all do it) and I was telling my cousin whom I'm helping teach to code this happens... burning a couple out hours for missing and "s". Thank you sir, and thank you User
Nov 9, 2021, 2:05 AM
hours*
Nov 9, 2021, 2:05 AM
I’ve been there many times, too. Glad it’s straightened.
Nov 9, 2021, 2:06 AM
it's all good, have a good one
Nov 9, 2021, 2:06 AM

Sanity– build remarkable experiences at scale

Sanity is a modern 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?