Disallow "$expr" in tanstack-query hook filters – not serializable for network
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
The filter typings live in the @zenstackhq/tanstack-query package; start by locating where its query filter type is declared and where $expr is inherited from the core where-input types. Issue #2647 is the referenced precedent, so read it for the intended shape of the change. Done means the exported hook filter type no longer accepts $expr, with the package's type tests (or a new negative type test) failing to compile when one is passed.
Written by the indexing model from the issue text.
Description
Description and expected behavior
In the @zenstackhq/tanstack-query package, the hook typings currently allow the use of $expr in query filters. However, $expr is not serializable across a network boundary, which can cause runtime errors and unexpected behaviors when filters using $expr are sent over the wire.
Expected behavior: The filter type for the tanstack-query hook should prevent the use of $expr. This ensures only serializable filters are accepted and avoids potential issues.
Screenshots
N/A
Environment (please complete the following information):
- ZenStack version: [e.g., 3.1.0]
- Database type: [e.g. Postgresql]
- Node.js/Bun version: [e.g., 20.0.0]
- Package manager: [e.g., npm, yarn, pnpm]
Additional context
See for reference: https://github.com/zenstackhq/zenstack/issues/2647
This change should enhance type safety and prevent non-serializable filters from causing problems in remote procedure calls.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 157
- Avg merge
- 11h 42m
- Merged PRs (30d)
- 20
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from zenstackhq/zenstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zenstackhq/zenstack#2873 ·
Maintainers usually reply within 1 day
-
runtime
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zenstackhq/zenstack#2868 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
zenstackhq/zenstack#2694 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
zenstackhq/zenstack#2659 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
zenstackhq/zenstack#2542 · 1 comment ·
Maintainers usually reply within 1 day
All issues in zenstackhq/zenstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cameri/nostream#811 · 1 comment ·
Maintainers usually reply within 1 day
-
bug p3 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug javascript P2-medium python release:v3.1
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
adrirubio/claude-deck#546 ·
Maintainers usually reply within 1 day
-
area: desktop area: website priority: P2 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
appandflow/stim#3411 · 1 comment ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rjsf-team/react-jsonschema-form#5485 ·
Maintainers usually reply within 2 days