graphprotocol / graphprotocol/graph-node
[Bug] Ordering by child attribute is not always deterministic
Open
Nobody has claimed this yet.
bug
Stale
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Bug report
In a query for parents that orders by child__id, if many parents belong to the same child, the ordering is not deterministic because the SQL query only orders by child.id. To make it deterministic, we need to order by child.id, parent.id
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
The issue names no files or tests; begin by locating the query and ordering entry point for parents ordered by child__id. Done means the ordering is deterministic when multiple parents share a child, with coverage demonstrating that parent.id is included in the ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, rust, sql
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100