Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

rejectLiveQueryInput.md

34 lines1.0 KB

1---
2id: rejectLiveQueryInput
3title: rejectLiveQueryInput
4---
5​
6```ts
7function rejectLiveQueryInput(collections, rejection): never;
8```
9​
10Defined in: [packages/db/src/live-query-options.ts:67](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-options.ts#L67)
11​
12Release the sync starts a rejected query input deferred, then rethrow its
13rejection. A framework hook calls this around its own render work, so a
14query the hook rejects leaves no source deferred and a later reader can
15start it. A render that throws after the hook returns, such as in a sibling
16hook, is not a rejection of this input: like any render that never commits,
17it releases its deferral through `releaseDeferredOnReclaim` when garbage
18collection reclaims its live query. As for a
19`DbClient` preload, the rejection wins over a source whose resumed start
20fails; that source records its own failure.
21​
22## Parameters
23​
24### collections
25​
26[`DeferredLiveQueryCollections`](../type-aliases/DeferredLiveQueryCollections.md) | `undefined`
27​
28### rejection
29​
30`unknown`
31​
32## Returns
33​
34`never`