trackQuery: read/write mapping for non-primitive query params
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 2
- Avg merge
- 13h 44m
- Merged PRs (30d)
- 1
Description
## Context (updated for current API)
The atomic-router `querySync({ mapQuery })` API is now the zod-based `trackQuery` (`packages/core/lib/track-query.ts`). The **read** side is already covered by zod (`parameters` can coerce/transform query into structured values). The **write** side has a gap: `enter` spreads the payload straight into the query (`{ ...query, ...payload }`) with no serialization hook.
## Request
Support custom serialization for non-primitive query params (objects, arrays, custom encodings) on both directions of `trackQuery`.
## Suggested shape
- Rely on zod `parameters` for parsing (read).
- Add a write serializer so `enter` can encode structured values back into query strings symmetrically.
## Traceability
Source: atomic-router/atomic-router#89 — https://github.com/atomic-router/atomic-router/issues/89
Related: #24
Contributor guide
Assessment
This issue has not been assessed yet.