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__groqResultand__groqParams, such as the default export of a.groqfile imported through@sanity-labs/groq-content-mapper, with no generic argument and noSanityQueriesentry.ClientReturnreads the result brand before the registry lookup, and the newClientParamstype reads the params brand;listenchecks params the same way. Reading the brand is experimental. Plain strings,defineQuery, explicit generics andSanityQueriesregistrations resolve as before. This backports #1373 from 8.11.0.