99designs / 99designs/gqlgen

How to tell gqlgen to leave my files where they are instead of copying them over to schema.resolvers

Aperta
#2,558 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
10.8k
Fork
1.3k
Merge medio
2g 36m
PR unite (30g)
26

Descrizione

### What happened?
I want to be able to split schema.resolvers into their associated files, I have about 5 models each with it's own `{name}.resolvers.go` but anytime i run `gqlgen` It copies their contents into `schema.resolvers` and hence creates a duplicate methods and at the end the resulting file gets too large

my configured folder has the following contents
```sh
graph
├── bot.resolvers.go
├── generated.go
├── media.resolvers.go
├── model
│ ├── inputs.go
│ ├── models_gen.go
│ └── models.go
├── notes.resolvers.go
├── resolver.go
├── schema.graphqls
├── schema.resolvers.go # 👈 everything gets copied here, I can't split input types into other files
└── user.resolvers.go
```

I need to configure gqlgen to stop copying my smaller files to `schema.resolvers` just like we can `autobind` the models

### versions
- `go run github.com/99designs/gqlgen version` v0.17.24
- `go version go1.18.3 linux/amd64`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.