github TanStack/db @tanstack/db@0.5.32

Patch Changes

  • fix(db): use Ref<T, Nullable> brand instead of Ref<T> | undefined for nullable join refs in declarative select (#1262)

    The declarative select() callback receives proxy objects that record property accesses. These proxies are always truthy at build time, but nullable join sides (left/right/full) were typed as Ref<T> | undefined, misleading users into using ?. and ?? operators that have no effect at runtime. Nullable join refs are now typed as Ref<T, true>, which allows direct property access without optional chaining while correctly producing T | undefined in the result type.

  • Fix unbounded WHERE expression growth in DeduplicatedLoadSubset when loading all data after accumulating specific predicates. The deduplication layer now correctly tracks the original request predicate (e.g., where: undefined for "load all") instead of the optimized difference query sent to the backend, ensuring hasLoadedAllData is properly set and subsequent requests are deduplicated. (#1348)

  • fix(db): throw error when fn.select() is used with groupBy() (#1324)

  • Add queryOnce helper for one-shot query execution, including findOne() support and optional QueryBuilder configs. (#1211)

Don't miss a new db release

NewReleases is sending notifications on new releases.