> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LiveQueryWatch

[API Reference](https://docs.modelence.com/api-reference/modelence/server/type-aliases/../../../index) / [modelence](https://docs.modelence.com/api-reference/modelence/server/type-aliases/../../index) / [server](https://docs.modelence.com/api-reference/modelence/server/type-aliases/../index) / LiveQueryWatch

> **LiveQueryWatch** = (`context`) => [`LiveQueryCleanup`](https://docs.modelence.com/api-reference/modelence/server/type-aliases/LiveQueryCleanup) | `void`

Defined in: [packages/modelence/src/live-query/context.ts:25](https://github.com/modelence/modelence/blob/main/packages/modelence/src/live-query/context.ts#L25)

Watch function that sets up real-time monitoring.
Receives a context with publish callback to trigger re-fetches.
Returns a cleanup function.

## Parameters

| Parameter | Type |
| - | - |
| `context` | `WatchContext` |

## Returns

[`LiveQueryCleanup`](https://docs.modelence.com/api-reference/modelence/server/type-aliases/LiveQueryCleanup) | `void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.