Binding to a generic type
- Dominant language
- Go
- Stars
- 10.8k
- Forks
- 1.3k
- Avg merge
- 2d 36m
- Merged PRs (30d)
- 26
Description
### What happened?
I tried to bind to a go1.18+ generic type. I tried the following config:
```yaml
mytype:
model: foo/bar.MyType
```
This generate invalid code and `gofmt` fail.
```yaml
mytype:
model: foo/bar.MyType[InnerType]
```
With this, gqlgen fail to find the type.
I didn't find anything suggesting that generic types are supported. Is that planned? Thanks for your work!
### What did you expect?
Working generated code, as if the underlying type wasn't a generic.
### Minimal graphql.schema and models to reproduce
Any generic type will do:
```go
type Foo[T any] struct {
Bar T
}
```
### versions
- `go run github.com/99designs/gqlgen version`? v0.17.13
- `go version`? go version go1.18.1 linux/amd64
Contributor guide
Assessment
This issue has not been assessed yet.