@frags thats worked! Thanks for the pointer and also the note about revalidate. Just had to google that and thats something good to know for the future.
Thanks @angeloashmore - I hadn't noticed my client was old. Just upgraded to 7.0.0 and using the fetchOptions doesn't seem to pull the latest changes when in local dev.
Could you clear your Next.js fetch cache and try again?
You can clear the cache by deleting the cache directory: .next/cache/fetch-cache.
Since you are using no-store, future requests shouldn't be added to the cache.
We will be releasing a CLI that automatically clears Prismic requests from that cache, which we will recommend calling before next dev or next build.
By the way, v7.0.0 and v6.8.0 were just released today and 2 days ago respectively. We wouldn't have expected you to already be using the latest version.
@angeloashmore when following your above example I get the following error?
Type '{ next: { revalidate: number; }; }' is not assignable to type 'RequestInitLike'. Object literal may only specify known properties, and 'next' does not exist in type 'RequestInitLike'.ts(2322) (property) revalidate: number
Could
You update to the latest version of @prismicio/next? The latest version includes a bit of code that adds support for the next property in fetchOptions.
And yes, you can use fetchOptions when creating a Prismic client, which will apply those options to all queries, or you can use/override fetchOptions on a per-query basis. That includes getSingle() and all other methods that query for content.
A post about the latest @prismicio/next updates will be out soon. But just so you can feel confident updating, the latest version (v1.1.0) does not include any breaking changes; it mainly adds support for the App Routes.