Major version upgrade to the JavaScript Client (@sanity/client)
Published: August 12, 2022
v3.0.0
Breaking changes:
- The client will now fetch from the API CDN when a token and
useCdn: trueare passed together. - The client now only supports Node.js v12 and higher.
- The deprecated
mergepatch operator was removed. - The deprecated
documentproperty onassets.uploadwas removed. client.observable.fetch()returns a cold observable.
Related documentation
API CDN
Description of the CDN-distributed, cached version of the Sanity API.
Getting started with @sanity/client
Learn how to install and configure the official Sanity JavaScript client for querying and mutating content across different environments.
API Versioning
How to handle versioning in the Sanity API