Stale data after "publish" webhook fires

Hello Prismic team!
When clicking on Publish, Prismic sends a webhook POST request to our NextJS server, which then tries to pull fresh data for the newly published documents. However, sometimes we receive old data (pre-publishing), and the end result is that our website doesn't get updated and our content editors are confused because they clicked publish and got no negative feedback that the publishing operation failed
Is this a known Prismic issue?
Can we do anything to avoid it?


Hello @alessandro.scandone,

Thanks for reaching out to us.

This might happen when the master ref isn't queried. Can you confirm that you're querying the master ref?

The master ref is updated as soon as you make a new publication. If you get and query your documents with the most up-to-date ref, you should be able to get the latest version of the content.

I recommend you follow our dedicated article: Changes in Prismic not appearing on your website .

Let me know if you need further assistance.


Hi Racheal, thank you for the very quick response. We fetch data without specifying an exact ref, so we assumed this was the master ref. Isn't that the case?
Is there a way to check which ref are we fetching?

Hi @alessandro.scandone,

It should be the master ref, but you can double-check by using the API Browser and also the Logs in the Webhooks section of settings