Skip to content

v6.0.0

Compare
Choose a tag to compare
@stipsan stipsan released this 03 May 13:50
· 706 commits to main since this release
284c845

6.0.0 (2023-05-03)

⚠ BREAKING CHANGES

  • useCdn is now set to true by default. Our CDN ensures your content has reliably, world-wide delivery by caching queries made from your front-end. If you require fresh data for every query, perhaps for testing purposes, add useCdn: false to your configuration.
  • Client will now automatically retry all GET/HEAD requests as well as queries if the server responds with a 429, 502 or 503 status code - as well as on socket/DNS errors. Previously, the client would immediately throw an error. If you have application-level retry code, you should either disable the retrying in the client by passing {maxRetries: 0}, or remove the custom retry code and potentially alter the retryDelay and maxRetries options to match your wanted behavior.

The migration guide outlines every breaking change and how to migrate your code

Introducing Content Source Maps

Note

Content Source Maps are available for select Sanity enterprise customers. Contact our sales team for more information.

Content Source Maps are an optional layer of contextual metadata sent with queries to enable use cases such as Visual Editing, tracing content lineage, and more. Our implementation of Content Source Maps are based on an open standard posted on GitHub, and you can read the API documentation here. To get started with Content Source Maps, check out the documentation in the README file.

Features

  • add automatic retrying of 429, 502, 503 (#199)

Bug Fixes

  • make useCdn use true by default (#191)
  • undeprecate request() (#205)

This release is also available on: