npm @sanity/client 7.28.0
v7.28.0

5 hours ago

Minor Changes

  • types: infer fetch result and params from a branded GROQ query (#1375) (b91149a)

    client.fetch(query, params) now infers its result and params types from a query branded with __groqResult and __groqParams, such as the default export of a .groq file imported through @sanity-labs/groq-content-mapper, with no generic argument and no SanityQueries entry. ClientReturn reads the result brand before the registry lookup, and the new ClientParams type reads the params brand; listen checks params the same way. Reading the brand is experimental. Plain strings, defineQuery, explicit generics and SanityQueries registrations resolve as before. This backports #1373 from 8.11.0.

Don't miss a new client release

NewReleases is sending notifications on new releases.