react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Defining and using an abstract collection type
Collection<T>, where T is a shared type definition of an object.
The service uses the input collection to query and manipulate the underlying collection, while abstracting the logic of fetching and persisting data. The individual apps can supply any collection they like, as long as the items in that collection match T.
How is this best achieved? When typing the input strictly as Collection<T>, I get various type issues, including the insert mutation transaction not propagating the row type. Instead it is typed as Record<string, any>...Partial collection updates
is there a way to know if there are any async mutations in-flight for a collection?
pendingMutations integer or a isMutating flag for a collection ? This would tremendously help in my opinion...is tanstack db an appropriate choice for a large paginated table?
useLiveInfiniteQuery it works great, but all my searches/filters/etc (my where clauses) would only be invoking the data in the collections cache. This is not ideal if an user wants to search for an order older than what is in the cache. If I ignore pagination and use the default eager it takes 15-20 seconds to load a 150mb table (not ideal either).
Hopefully this question makes sense. For reference, I am using tRPC and Prisma....Where to put query client when using DB with Start
type signature for query builder instance?
How to get ctx.meta?.loadSubsetOptions type safe?
meta being Record<string, unknown> | undefined, loadSubsetOptions is typed unknown.
Is there a way to make it type safe or I should just cope with @ts-ignore?
```ts
createCollection(...Default where clause on queries
Is there a way of formatting data at the collection level on certain queries?
Type error when disabling useLiveSuspenseQuery
Updates not persisting
On-Demand Sync Mode w/ Electric Collections
Unable to reliably await collection queryFn + data being "Ready"
await queryClient.ensureQueryData(...) (so my route will show a loading fallback until the promise resolves). It's a wonderful pattern and I am hoping to repeat it with tanstack db using await someCollection.preload() but am getting inconsistent results.
It seems sometimes my route components render when a query result is an empty array, for just a quick flash, and then the results become available. I assume there is some solution for me in the docs, but the API reference for Collection gives a 404... so I have resorted to trying to read the source code and can't find an issue / the answer there. Maybe there is just a broken link for this Collection documentation? And it could be fixed? And then I would find the answer there? 🙏 tyia...Shortcomings with vue version of tanstackDB?
SSE behind Cloudflare
liveSse: true to my shape options when building my collections. I had some issues once I deployed to prod with it though - I'm behind Cloudflare and I noticed collections getting slow/not updating for a while before everything came through at once. Is it expected to work behind the CF proxy?Question about targeted refetch behavior in on-demand with queryCollection
on-demand mode after updating a specific item (I attached a POC script to reproduce this).
Scenario:...queryCollectionOptions type error missing compareOptions/comparisonOpts

useLiveSuspenseQuery not reactive?
"on-demand" live query returns empty data on remount.
Recommended patterns for syncing rows which can belong to multiple users
``
const filter = user_id = '${user.id}'`...