Optionalparams?: QueryParams | Promise<QueryParams>Parameters used by the GROQ query.
Optionalperspective?: LivePerspectiveContent perspective used for the fetch.
The default is 'published' unless
Cache Components are disableddefineLive() was given a serverTokendefineLive() is not set to strict: truedraftMode() is enabledIf all of the above conditions are met, then the default value will be resolved from attempting to read the 'sanity-preview-perspective' cookie and fall back to 'drafts' if not set
GROQ query to execute.
OptionalrequestTag?: stringRequest tag used to identify the request in Sanity Content Lake logs.
Optionalstega?: booleanEnables stega encoding of the data. This is typically only used in draft
mode with perspective: 'drafts' and @sanity/visual-editing.
The default is false unless
Cache Components are disableddefineLive() was given a serverTokendefineLive() is not set to strict: truedefineLive() was given a client that defines stega.studioUrldraftMode() is enabledIf all of the above conditions are met, then the default value will be true
Optionaltags?: string[]Additional cache tags to associate with this fetch.
The default behavior will always add cache tags automatically for the query based on the syncTags response returned by Content Lake.
You only need to define custom tags if you also mutate content in a server action and need to implement read-your-own-write UI.
When cacheComponents: false your custom tags are appended to the underlying next.tags array on the fetch request and are subject to the tag length and max tag items limits of Next.js.
cacheComponents: true your custom tags are appended to the underlying cacheTag() call and are subject to the tag length and max tag items limits of Next.js.
Fetches data through the configured Sanity client and returns the result together with the source map and cache tags that Sanity Live uses for targeted revalidation.
Returned by
defineLive({strict: false})anddefineLive({strict: undefined}).