Fix object-list filter preflight plan traversal and argument identification
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- fsharp, graphql
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu với preflight của yêu cầu lọc ObjectListFilter và việc duyệt qua executable plan, sau đó xem lại phần thảo luận của pull request được liên kết để có thêm ngữ cảnh. Theo dõi các collection plan deferred, streamed, live và nested, đồng thời xác minh việc xử lý inclusion-state và nhận diện đối số nullable ObjectListFilter do middleware thêm vào. Hoàn thành khi các filter wrapped và nested được coerced, còn các filter argument bị loại trừ hoặc không liên quan vẫn được chấp nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The object-list filter request preflight does not accurately follow the executable plan and can both miss invalid filters and reject valid requests.
The preflight should traverse deferred, streamed, live, and nested collection plans while only coercing the nullable ObjectListFilter argument added by the object-list filter middleware.
Source: https://github.com/fsprojects/FSharp.Data.GraphQL/pull/612#pullrequestreview-5253463363
Repro steps
-
Execute a query where an object-list filter is inside an
@defer,@stream, or@livewrapper, or inside a nested collection element plan. -
Observe that request-level filter coercion can be bypassed.
-
Execute a query containing an excluded subtree or an unrelated field with an argument such as
filter: String. -
Observe that the preflight can treat that argument as the middleware's object-list filter and reject an otherwise valid request.
Expected behavior
The preflight should:
- traverse
@defer,@stream, and@livewrappers transparently; - traverse collection element plans and nested filtered fields;
- skip nodes excluded by execution directives;
- coerce only fields whose definition contains the middleware-added nullable
ObjectListFilterargument.
Actual behavior
The traversal stops at wrappers and collection element plans, allowing wrapped or nested list filters to bypass request-level coercion. It also ignores inclusion state and identifies arguments by the name filter, which can incorrectly reject excluded subtrees or unrelated filter arguments.
Known workarounds
Avoid wrapping or nesting object-list-filtered fields and avoid unrelated arguments named filter. These are not practical general-purpose workarounds.
Related information
- Operating system: All
- Branch:
dev/ observed while reviewingtask-seq-field-streaming-fixes - .NET Runtime, CoreCLR or Mono Version: .NET 10
- Performance information, links to performance testing scripts: N/A
- Ngôn ngữ chính
- F#
- Star
- 406
- Fork
- 74
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fsprojects/FSharp.Data.GraphQL
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
fsprojects/FSharp.Data.GraphQL#573 · 1 reaction · 2 người được giao ·
-
FR: Suave package Đang mở
fsprojects/FSharp.Data.GraphQL#566 · 1 bình luận · 1 reaction · 2 người được giao ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của fsprojects/FSharp.Data.GraphQL
Issue tương tự
-
bug priority:normal ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenHands/extensions#626 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·