Tags → auto queryKey
No explicit key — derived from tag values
Resolved queryKey
["[\"todos\"]"]Basics
The withTags helper merges tags into meta.tags and optionally derives a stable queryKey from the tag values — zero manual key management.
Before — manual wiring
const opts = {
queryKey: ["todos"],
queryFn: () => getTodosServerFn(),
meta: {
tags: [appTags.todos.list()],
},
};After — withTags
const opts = withTags(
{ queryFn: () => getTodosServerFn() },
[appTags.todos.list()],
);
// queryKey auto-derived from tags!No explicit key — derived from tag values
Resolved queryKey
["[\"todos\"]"]Key: ["basics", "withtags", "custom"]
Resolved queryKey
["basics","withtags","custom"]Both cards share the same tag — they both flash green even with different query keys.