Skip to content

Commit 24c8fa6

Browse files
committed
improve example
1 parent 70326ad commit 24c8fa6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/blog/tanstack-db-0.5-query-driven-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ queryFn: async (ctx) => {
337337

338338
You write this mapping once per collection. After that, every query automatically generates the right API calls.
339339

340-
**Can't modify your API?** Your mapping doesn't need to be precise. Many queries can map to a single broad API call—for example, any product search query could map to `GET /api/products` which returns all products. TanStack DB filters client-side. As your API evolves to support more predicates, your client code doesn't change—just update the mapping to push down more filters. Start broad, optimize incrementally.
340+
**Can't modify your API?** Your mapping doesn't need to be precise. Many queries can map to a single broad API call—for example, any product search query with category "hardware" could map to `GET /api/products?category=hardware`. TanStack DB will apply the remainder of the query client-side. As your API evolves to support more predicates, your client code doesn't change—just update the mapping to push down more filters. Start broad, optimize incrementally.
341341

342342
[Full Query Collection predicate parsing documentation →](https://tanstack.com/db/latest/docs/collections/query-collection#queryFn-and-predicate-push-down)
343343

0 commit comments

Comments
 (0)