Skip to content

Releases: shadowjs-dev/query

1.0.3

Choose a tag to compare

@github-actions github-actions released this 29 Oct 10:28

Fixed

  • A throw in a mutation's onSettled after a success is reported like other callback errors; it no longer fails the call, runs onError (a rollback after a good write) or runs onSettled twice.
  • 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

Choose a tag to compare

@github-actions github-actions released this 29 Oct 01:05

Fixed

  • A gcTime or retryDelay above 2147483647 ms is capped at the longest a timer can wait; before, such a gcTime removed an unobserved entry after one millisecond and such a retry delay retried at once.
  • A refetchInterval of Infinity (or NaN) no longer polls in a hot loop, and one above 2147483647 ms is capped.
  • reset() of useMutation also ignores a call that is still running, so its late result no longer turns the status back from idle.
  • persist reports 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

Choose a tag to compare

@github-actions github-actions released this 28 Oct 05:36

Changed

  • Released at 1.0.1 with the other packages, which share one version. No change to this package.

1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 09:49

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 on pagehide), size caps, quota and error handling that
    never throws into app code, a restore that shows data with no loading state, and BroadcastChannel sync 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, and client.resumePausedMutations() replays on demand.
    useMutation takes networkMode.
  • persist({ mutations }) stores queued mutations and replays them after a reload (at least once, one tab per call
    through Web Locks where available).
  • createDehydrationStream and hydrateFromStream (@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.