Repository navigation
Releases: shadowjs-dev/query
Releases · shadowjs-dev/query
Release list
1.0.3
Fixed
- A throw in a mutation's
onSettledafter a success is reported like other callback errors; it no longer fails the call, runsonError(a rollback after a good write) or runsonSettledtwice. - The garbage-collection timer of an unobserved entry is unref'd in Node, so server-rendered pages no longer keep the process (and the per-request client) alive for
gcTime. - Smaller bundles with the same behavior. Production builds of table, query and virtual throw short codes (
TABLE_DUPLICATE,QUERY_LIMIT,VIRTUAL_KERNEL) instead of the development messages; each package's README lists them.
1.0.2
Fixed
- A
gcTimeorretryDelayabove 2147483647 ms is capped at the longest a timer can wait; before, such agcTimeremoved an unobserved entry after one millisecond and such a retry delay retried at once. - A
refetchIntervalofInfinity(orNaN) no longer polls in a hot loop, and one above 2147483647 ms is capped. reset()ofuseMutationalso ignores a call that is still running, so its late result no longer turns the status back fromidle.persistreports a corrupt stored mutation list, a paused mutation whose key is not plain data, and a storage that refuses to delete an unusable cache, instead of dropping them silently.
1.0.1
Changed
- Released at 1.0.1 with the other packages, which share one version. No change to this package.
1.0.0
Added
- Reactive queries, infinite queries and mutations with keyed caching and invalidation.
- Optional offline, scope, inspection and hydration features with a full preset.
persist(@shadow-js/query/persist): keeps the cache in a storage (localStorage, IndexedDB, React Native) with
maxAge,buster,shouldPersist, throttled writes (flushed onpagehide), size caps, quota and error handling that
never throws into app code, a restore that shows data with no loading state, andBroadcastChannelsync between tabs.queue(@shadow-js/query/queue): retries wait while the browser is offline; mutations made offline wait in a queue
(isPaused), replay one at a time in call order on reconnect, andclient.resumePausedMutations()replays on demand.
useMutationtakesnetworkMode.persist({ mutations })stores queued mutations and replays them after a reload (at least once, one tab per call
through Web Locks where available).createDehydrationStreamandhydrateFromStream(@shadow-js/query/server): queries that finish after the shell are
appended to a streamed response and read as the browser parses them.- Hydrated and restored fetch times ahead of the local clock are clamped to now.