Follow-ups for GqlNodeState
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 642
- Forks
- 70
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 21
Description
Missing functionality from core Rust NodeState:
- Merging.
NodeStates can't be merged in GraphQL. Passing anotherNodeStateas argument to the merge function is awkward to express in GraphQL queries. - Parquet serialization.
to_parquetandfrom_parquetweren't added because they would require filesystem access on the server's machine, which could present a security risk.
Re-implemented:
sum and mean. In Rust, the trait bounds ensure that the inputs to these are numerical/additive. In GraphQL, we can't use these trait bounds to ensure the NodeState has numerical values. As such, these functions were re-implemented and return None if the values aren't numerical/additive at runtime.
Still need to add:
- Paging. Right now, accessing the data in a NodeState is done using
columns/nodes/rows. These dump the entireNodeState's contents (columns, nodes, or rows respectively) in a single response, which can be a problem on big NodeStates. Ideally, we can page the results like with other queries. - Testing for
GqlNodeStateValue::Node. It is currently present in GraphQL to match core Rust, but no algorithm returns a single-node column, so it is unused/untested.
Contributor guide
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.
Research direction
Start with the GraphQL NodeState definitions and the existing columns, nodes, and rows accessors. Trace how other queries implement paging, then define completion as paged NodeState results rather than dumping all contents. Also inspect GqlNodeStateValue::Node and add coverage showing its GraphQL behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100