Issues with API content updates not reflecting in Sanity UI or GROQ queries
23 replies
Last updated: Nov 9, 2021
B
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
B
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 clientNov 9, 2021, 1:43 AM
B
I'm trying to figure out if there is a way to see all data, deleted or otherwise
Nov 9, 2021, 1:47 AM
B
I'm trying to figure out if there is a way to see all data, deleted or otherwise
Nov 9, 2021, 1:47 AM
B
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
B
😬 my bad, i meant to say they were not showing up. I'll updated that
Nov 9, 2021, 1:50 AM
B
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
B
for example, here the "slug" and "mainImage" is there
Nov 9, 2021, 1:56 AM
B
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
B
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
B
nope
Nov 9, 2021, 2:00 AM
B
that's what I have it set to normally
Nov 9, 2021, 2:00 AM
B
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
postand
posts.
Nov 9, 2021, 2:03 AM
B
GASPS
Nov 9, 2021, 2:04 AM
B
oh my goodness
Nov 9, 2021, 2:04 AM
B
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
B
hours*
Nov 9, 2021, 2:05 AM
B
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.