graphprotocol / graphprotocol/graph-node
[Bug] Disallow sorting by child fields that are arrays
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Bug report
In a subgraph schema like
type Parent {
id: ID!
children: [Child!]!
}
we allow a query like parents(orderBy: children__id) { .. } but that ordering doesn't make much sense. When a parent has multiple children, it's not clear which child's id we will use for the ordering. We should simply not support that.
Some information to help us out
- Tick this box if this bug is caused by a regression found in the latest release.
- Tick this box if this bug is specific to the hosted service.
- I have searched the issue tracker to make sure this issue is not a duplicate.
OS information
None
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
In der Issue werden keine Datei, kein Test und kein Einstiegspunkt genannt. Beginne damit nachzuverfolgen, wie GraphQL orderBy-Felder für verschachtelte Relationen validiert werden, und reproduziere anschließend den Parent/children-Schemafall; fertig ist es, wenn die Sortierung nach einem Array-Feld eines untergeordneten Datensatzes abgelehnt wird, während unterstützte skalare Relationen weiterhin gültig bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- graphql, rust
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100