Fix object-list filter preflight plan traversal and argument identification
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- fsharp, graphql
- Domain
- api, backend-api-design
Research direction
Start with the object-list filter request preflight and executable plan traversal, then review the linked pull request discussion for context. Trace deferred, streamed, live, and nested collection plans, and verify inclusion-state handling and identification of the middleware-added nullable ObjectListFilter argument. Done means wrapped and nested filters are coerced while excluded or unrelated filter arguments are accepted.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- F#
- Stars
- 406
- Forks
- 74
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
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 fsprojects/FSharp.Data.GraphQL
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
fsprojects/FSharp.Data.GraphQL#573 · 1 reaction · 2 assignees ·
-
FR: Suave package Open
fsprojects/FSharp.Data.GraphQL#566 · 1 comment · 1 reaction · 2 assignees ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in fsprojects/FSharp.Data.GraphQL
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100