Open History to see the last commit
1---
2id: queryCollectionOptions
3title: queryCollectionOptions
4---
5
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7
8# Function: queryCollectionOptions()
9
10```ts
11function queryCollectionOptions<TItem, TError, TQueryKey, TKey, TInsertInput>(config): CollectionConfig<TItem, string | number, StandardSchemaV1<unknown, unknown>, TItem> & object
12```
13
14Defined in: [packages/query-db-collection/src/query.ts:277](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L277)
15
16Creates query collection options for use with a standard Collection
17
18## Type Parameters
19
20• **TItem** *extends* `object`
21
22• **TError** = `unknown`
23
24• **TQueryKey** *extends* readonly `unknown`[] = readonly `unknown`[]
25
26• **TKey** *extends* `string` \| `number` = `string` \| `number`
27
28• **TInsertInput** *extends* `object` = `TItem`
29
30## Parameters
31
32### config
33
34[`QueryCollectionConfig`](../../interfaces/querycollectionconfig.md)\<`TItem`, `TError`, `TQueryKey`\>
35
36Configuration options for the Query collection
37
38## Returns
39
40`CollectionConfig`\<`TItem`, `string` \| `number`, `StandardSchemaV1`\<`unknown`, `unknown`\>, `TItem`\> & `object`
41
42Collection options with utilities