npm / @sanity/client
@sanity/client
What changed in @sanity/client 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 deprecations5 new APIs and options1 behavior and defaults1 tooling2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@sanity/client 810 changes
Deprecations 1
range, top-level fieldValue, and range: null are deprecated; they are still accepted and sent as anchor.
New APIs and options 5
Comment create and update now accept a typed anchor with type "portable-text" and optional fieldValue.
Exported from @sanity/client/collaboration to build a collaboration comment's global document reference from a resource and document ID without a client.
Adds a per-resource projection registry with a document-type level because projections resolve against the caller's document handle.
Adds a per-resource query registry for consumers that perform resource-aware lookups.
Adds a per-resource schema registry so consumers can register different result types for resources whose schemas disagree.
Behavior and default changes 1
Comment writes now send clientVersion.
Tooling 1
Types are updated with the latest Context API descriptions, helping developers use the current context API accurately.
Fixes and other changes 2
The underlying EventSource request is aborted when the response fails validation.
Requests are retried on React Native.