Ways to modify a result of a more high-level resolver
Open
- Dominant language
- Go
- Stars
- 10.8k
- Forks
- 1.3k
- Avg merge
- 2d 36m
- Merged PRs (30d)
- 26
Description
I have something like this in my schema
```
type Query {
request: QueryMessageOt!
}
type QueryMessageOt {
requestID: ID!
offline: Boolean!
executionTime: Float
cargo(filter: CargoFilterIt!, cursor: String, limit: Int): CargoResult
}
```
How can i modify root fields in my `cargo` resolver? For example, i want to accumulate the execution time, but when i do this:
```go
func (r *queryMessageOtResolver) Cargo(ctx context.Context, obj *model.QueryMessageOt, filter model.CargoFilterIt, cursor *string, limit *int) (*model.CargoResult, error) {
*obj.ExecutionTime += 777.0
return nil, nil
}
```
i still get old execution time from `request` resolver.
Contributor guide
Assessment
This issue has not been assessed yet.