struct field is created even though `forceResolver: true`
- Lenguaje dominante
- Go
- Estrellas
- 10.8k
- Forks
- 1.3k
- Merge medio
- 2 d 36 min
- PR fusionados (30 d)
- 26
Descripción
### What happened?
I added `@goField(forceResolver: true)` to a field. As expected, a new resolver was added, but a field was also added to the struct in `models_gen.go`.
### What did you expect?
I expected for only the resolver to be created. Since that field is not being resolved as part of the struct i expected no field to be added to the struct.
### Minimal graphql.schema and models to reproduce
```
type User {
friends: [User!]! @goField(forceResolver: true)
}
```
### versions
- `gqlgen version`?
```
github.com/99designs/gqlgen v0.13.0 h1:haLTcUp3Vwp80xMVEg5KRNwzfUrgFdRmtBY8fuB8scA=
github.com/99designs/gqlgen v0.13.0/go.mod h1:NV130r6f4tpRWuAI+zsrSdooO/eWUv+Gyyoi3rEfXIk=
```
- `go version`?
```
go version go1.15.6 linux/amd64
```
- dep or go modules?
go mod
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.