DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/convex-db-collection/type-aliases/ConvexCollectionConfig.md
ConvexCollectionConfig
ts
type ConvexCollectionConfig<TQuery, TItem, TKey, TSchema> = Omit<BaseCollectionConfig<TItem, TKey, TSchema, ConvexCollectionUtils, unknown>, "syncMode" | "utils" | "schema"> & object & [TSchema] extends [never] ? object : object &
| {
select: (result) => ReadonlyArray<TItem>;
}
| FunctionReturnType<TQuery> extends ReadonlyArray<TItem> ? object : never;Defined in: index.ts:21
Type Declaration#
client#
ts
client: ConvexCollectionClient;Share the client used for mutations, authentication, and reconnects.
onError()?#
ts
optional onError: (error) => void;Reports subscription and result-conversion failures, including after readiness.
Parameters#
error#
unknown
Returns#
void
query#
ts
query: TQuery;queryArgs#
ts
queryArgs: FunctionArgs<TQuery>;Type Parameters#
TQuery#
TQuery extends FunctionReference<"query">
TItem#
TItem extends object = QueryRow<TQuery>
TKey#
TKey extends string | number = string | number
TSchema#
TSchema extends StandardSchemaV1<TItem, TItem> = never