unstale

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

@unstale/cli on npm

@sanity/client 810 changes

Deprecations 1

  • range, top-level fieldValue, and range: null are deprecated; they are still accepted and sent as anchor.

    8.8.0release notes

New APIs and options 5

  • Comment create and update now accept a typed anchor with type "portable-text" and optional fieldValue.

    8.8.0release notes

  • Exported from @sanity/client/collaboration to build a collaboration comment's global document reference from a resource and document ID without a client.

    8.8.0release notes

  • Adds a per-resource projection registry with a document-type level because projections resolve against the caller's document handle.

    8.7.0release notes

  • Adds a per-resource query registry for consumers that perform resource-aware lookups.

    8.7.0release notes

  • Adds a per-resource schema registry so consumers can register different result types for resources whose schemas disagree.

    8.7.0release notes

Behavior and default changes 1

Tooling 1

  • Types are updated with the latest Context API descriptions, helping developers use the current context API accurately.

    8.8.0release notesrelease notes

Fixes and other changes 2

  • The underlying EventSource request is aborted when the response fails validation.

    8.7.0release notes

  • Requests are retried on React Native.

    8.7.0release notes