Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#2,648 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
2.9k
Fork
157
Merge trung bình
2 ngày 46 phút
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của zenstackhq/zenstack

Tất cả issue của zenstackhq/zenstack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.