graphprotocol / graphprotocol/graph-node

Cannot Sort queries by enum

Aperta
#4,221 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area/graphql enhancement Stale
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

Do you want to request a feature or report a bug?

Feature (maybe bug)

What is the current behavior?

When you make a query and try to sort on an enum you get an error.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

Ideally we would want to be able to sort using an enum. I believe the issue is that enum Types create a custom type that can't be sorted in AssemblyScript, but they are almost always strings. I guess I would imagine it should be stored as a string (maybe) and then it would be able to be sorted on like that.

Against my point, if you made an enum numbers it wouldn't be totally accurate.

Moral of the story, it would be nice to sort on enums. Example query

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con la query GraphQL collegata e riproduci il fallimento durante l'ordinamento delle posizioni in base al campo enum side. Poiché nell'issue non sono indicati file o test, traccia la gestione di enum orderBy della query; il lavoro è completato quando i campi enum possono essere usati per l'ordinamento con un comportamento definito per i valori stringa e numerici.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
graphql, rust
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.