99designs / 99designs/gqlgen

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

Open
#2,558 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

### 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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.