Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .changeset/fix-query-collection-default-options.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/fix-write-delete-in-handlers.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/react/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.1.14",
"@tanstack/query-core": "^5.90.5",
"@tanstack/query-db-collection": "^0.2.33",
"@tanstack/query-db-collection": "^0.2.34",
"@tanstack/react-db": "^0.1.34",
"@tanstack/react-router": "^1.133.15",
"@tanstack/react-router-devtools": "^1.133.15",
Expand Down
7 changes: 7 additions & 0 deletions examples/react/todo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# examples/react/todo

## 0.1.13

### Patch Changes

- Updated dependencies [[`16dbfe3`](https://github.com/TanStack/db/commit/16dbfe34d5a5c075211453566f3a0453aa0ee76f), [`5950583`](https://github.com/TanStack/db/commit/595058384c88730f325ac23415bdb0643eea89fa)]:
- @tanstack/query-db-collection@0.2.34

## 0.1.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/react/todo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/db-example-react-todo",
"private": true,
"version": "0.1.12",
"version": "0.1.13",
"dependencies": {
"@tanstack/electric-db-collection": "workspace:^",
"@tanstack/query-core": "^5.90.5",
Expand Down
38 changes: 38 additions & 0 deletions packages/query-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @tanstack/query-db-collection

## 0.2.34

### Patch Changes

- Fix queryCollectionOptions to respect QueryClient defaultOptions when not overridden ([#707](https://github.com/TanStack/db/pull/707))

Previously, when creating a QueryClient with defaultOptions (e.g., staleTime, retry, refetchOnWindowFocus), these options were ignored by queryCollectionOptions unless explicitly specified again in the collection config. This required duplicating configuration and prevented users from setting global defaults.

Now, queryCollectionOptions properly respects the QueryClient's defaultOptions as fallbacks. Options explicitly provided in queryCollectionOptions will still override the defaults.

Example - this now works as expected:

```typescript
const dbQueryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: Infinity,
},
},
})

queryCollectionOptions({
id: "wallet-accounts",
queryKey: ["wallet-accounts"],
queryClient: dbQueryClient,
// staleTime: Infinity is now inherited from defaultOptions
})
```

- Fix writeDelete/writeUpdate validation to check synced store only ([#708](https://github.com/TanStack/db/pull/708))

Fixed issue where calling `writeDelete()` or `writeUpdate()` inside mutation handlers (like `onDelete`) would throw errors when optimistic updates were active. These write operations now correctly validate against the synced store only, not the combined view (synced + optimistic).

This allows patterns like calling `writeDelete()` inside an `onDelete` handler to work correctly, enabling users to write directly to the synced store while the mutation is being persisted to the backend.

Fixes #706

## 0.2.33

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/query-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/query-db-collection",
"description": "TanStack Query collection for TanStack DB",
"version": "0.2.33",
"version": "0.2.34",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
"@tanstack/db": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.