99designs / 99designs/gqlgen

How to add custom error code like 404, 401, 400 with gqlgen + gin?

Aperta
#2,653 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
10.8k
Fork
1.3k
Merge medio
2g 36m
PR unite (30g)
26

Descrizione

### What happened?
Current resolver do not have gin context that means and method only returns err

### What did you expect?
Want to have custom error code like `ctx.JSON(http.StatusNotFound, responseBody)` but gqlgen only handles it by returning array of error, is there any way to solve this?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.