Omit chan element pointers
- Ngôn ngữ chính
- Go
- Star
- 10.8k
- Fork
- 1.3k
- Merge trung bình
- 2 ngày 36 phút
- Pull request đã merge (30 ngày)
- 26
Mô tả
### What happened?
Defined a simple subscription.
```graphql
type Subscription {
todoAdded: Todo!
}
```
### What did you expect?
I expected the generated code to use a channel of my `Todo` struct, but not pointers.
```diff
-- <-chan *model.Todo
++ <-chan model.Todo
```
I get that gqlgen uses pointers on query resolvers, because on GraphQL you can return `null`, but it doesn't make much sense for a subscription. Maybe this can be configurable the same way that slices are `omit_slice_element_pointers: true` 🤔
### Minimal graphql.schema and models to reproduce
### versions
- `gqlgen version`? v0.12.2-dev
- `go version`? go version go1.15 linux/amd64
- dep or go modules? go modules
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.