Next.js Discord

Discord Forum

Time based revalidation issue

Answered
Shayokh posted this in #help-forum
Open in Discord
I have integrated Sanity CMS into my Nextjs project. Now, I want to use the time based cache revalidation to let users see the updated data after like 1 min. But I am getting this deprecated warning
Answered by B33fb0n3
looks like you using it a GROQ parameter and not as fetch parameter. That is likely a mistake. Provide the object to your fetch function and it'll work fine
View full answer

4 Replies

@Shayokh I have integrated Sanity CMS into my Nextjs project. Now, I want to use the time based cache revalidation to let users see the updated data after like 1 min. But I am getting this deprecated warning
looks like you using it a GROQ parameter and not as fetch parameter. That is likely a mistake. Provide the object to your fetch function and it'll work fine
Answer
@Shayokh solved?
Yes