modelenceLiveQuery<Defined in: index.ts:146 Creates query options for live queries with TanStack Query’s useQuery hook. Data will be updated in real-time when underlying data changes. Requires ModelenceQueryClient to be connected to your QueryClient.T>(methodName,args):object
Example
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T | unknown | The expected return type of the query |
Parameters
| Parameter | Type | Description |
|---|---|---|
methodName | string | The name of the method to query |
args | Args | Optional arguments to pass to the method |
Returns
object
Query options object for TanStack Query’s useQuery
| Name | Type | Default value | Defined in |
|---|---|---|---|
gcTime | number | 0 | index.ts:207 |
queryFn() | () => Promise<T> | - | index.ts:155 |
queryKey | readonly ["live", string, Args] | - | index.ts:154 |
refetchOnMount | boolean | false | index.ts:205 |
refetchOnReconnect | boolean | false | index.ts:206 |
refetchOnWindowFocus | boolean | false | index.ts:204 |
staleTime | number | Infinity | index.ts:203 |