Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Disallow "$expr" in tanstack-query hook filters – not serializable for network

Open
#2,648 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zenstackhq/zenstack

All issues in zenstackhq/zenstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.