Commit a064cb4
Automatically subscribe/unsubscribe from TanStack Query based on collection subscriber count (TanStack#462)
* Automatically subscribe/unsubscribe from TanStack Query
When a collection backed by a TanStack Query has no active subscribers,
automatically unsubscribe from the query.
* fix types during build
* Add changeset for staleTime bug fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Clarify startSync JSDoc to explain pause/resume behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Sam Willis <[email protected]>
Co-authored-by: Kyle Mathews <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent 3d5f782 commit a064cb4
File tree
7 files changed
+264
-19
lines changed- .changeset
- packages
- db/src
- collection
- query-db-collection
- src
- tests
7 files changed
+264
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| |||
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
382 | 386 | | |
383 | | - | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| |||
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
475 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
476 | 510 | | |
477 | 511 | | |
478 | 512 | | |
479 | | - | |
| 513 | + | |
480 | 514 | | |
481 | 515 | | |
482 | | - | |
| 516 | + | |
| 517 | + | |
483 | 518 | | |
484 | 519 | | |
485 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
0 commit comments