Fix object-list filter preflight plan traversal and argument identification

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

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
  1. Execute a query where an object-list filter is inside an @defer, @stream, or @live wrapper, or inside a nested collection element plan.

  2. Observe that request-level filter coercion can be bypassed.

  3. Execute a query containing an excluded subtree or an unrelated field with an argument such as filter: String.

  4. 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 @live wrappers 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 ObjectListFilter argument.
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 reviewing task-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

  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 fsprojects/FSharp.Data.GraphQL

Tất cả issue của fsprojects/FSharp.Data.GraphQL

Issue tương tự

Thêm issue về Backend & API Design

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.