Minor Changes
-
4575de2: Simplify the imperative factory API so query reads choose a cache policy explicitly and mutations use the callable form as their only imperative trigger.
Queries now expose:
.fetch(): run through TanStack Query's freshness-awarefetchQuerypath..ensure(): return cached data if it exists, fetching only when the cache has no data.
This makes the read policy visible at the call site:
const freshEnough = await userQuery.fetch(); const cacheFirst = await userQuery.ensure();
Mutations no longer expose a duplicate
.execute()helper:const saved = await saveUser(input);
The richer TanStack mutation observer surface still lives behind
.optionsfor hooks.