gqlgen only return 200 error
Ouverte
- Langage dominant
- Go
- Étoiles
- 10.8k
- Forks
- 1.3k
- Merge moyen
- 2 j 36 min
- PR mergées (30 j)
- 26
Description
I want to return Http status code errors(400,500) in gqlgen Graphql Query
I tried
"github.com/vektah/gqlparser/v2/gqlerror"
err := gqlerror.Error{
Message: "Invalid Data",
Extensions: map[string]interface{}{
"code": 400,
},
}
this method.But its return 200 APi response with this error body.
How to change this 200 error to 400 error in GQL API?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.