Allow returning partial results with errors
Ouverte
- Langage dominant
- Go
- Étoiles
- 10.8k
- Forks
- 1.3k
- Merge moyen
- 2 j 36 min
- PR mergées (30 j)
- 26
Description
Sometimes the request sent by the client can partially succeed. Example: when extracting data from a thread of e-mails, one bad e-mail may be unreadable (e.g. charset/encoding error) but the rest of the e-mail thread might be fine.
It would be useful to be able to return an error alongside non-nil data. Basically, from a resolver:
```go
func (r Query) DoThings(ctx context.Context) (*MyResult, error) {
return &MyResult{"Partial data"}, errors.New("some non-fatal errors occured")
}
```
Right now, gqlgen ignores the data when a resolver returns an error.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.