> ## 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.

# LiveDataConfig

[API Reference](/api-reference/modelence/server/interfaces/../../../index) / [modelence](/api-reference/modelence/server/interfaces/../../index) / [server](/api-reference/modelence/server/interfaces/../index) / LiveDataConfig

Defined in: [packages/modelence/src/live-query/context.ts:30](https://github.com/modelence/modelence/blob/f614ecc6811cdda9670d612872c8ff49a49c5e28/packages/modelence/src/live-query/context.ts#L30)

Configuration for creating LiveData.

## Type Parameters

| Type Parameter | Default type |
| -------------- | ------------ |
| `T`            | `unknown`    |

## Properties

| Property                 | Type                                                                                          | Description                                                                     | Defined in                                                                                                                                                                               |
| ------------------------ | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="fetch" /> `fetch` | () => `T` \| `Promise`\<`T`>                                                                  | Fetches the current data. Called initially and whenever watch triggers publish. | [packages/modelence/src/live-query/context.ts:34](https://github.com/modelence/modelence/blob/f614ecc6811cdda9670d612872c8ff49a49c5e28/packages/modelence/src/live-query/context.ts#L34) |
| <a id="watch" /> `watch` | [`LiveQueryWatch`](/api-reference/modelence/server/interfaces/../type-aliases/LiveQueryWatch) | Sets up watching for changes. Receives publish callback and returns cleanup.    | [packages/modelence/src/live-query/context.ts:38](https://github.com/modelence/modelence/blob/f614ecc6811cdda9670d612872c8ff49a49c5e28/packages/modelence/src/live-query/context.ts#L38) |
