Add a property to the resolver config to allow for a full resolvergen configuration
- Linguagem predominante
- Go
- Estrelas
- 10.8k
- Forks
- 1.3k
- Merge médio
- 2d 36min
- PRs com merge (30d)
- 26
Descrição
### What happened?
I need to be able to run gqlgen and pass in a template for generating a resolver.
I need to be able to pass in new imports and make significant code additions (maybe even some convenience methods). This will allow my implementing team to follow my guidlines.
### What did you expect?
I thought the config would have an option to just replace the whole gotpl file... it doesn't.
### Minimal graphql.schema and models to reproduce
```
type Query {
resolver: Resolver!
}
type Resolver {
name: String!
}
```
```
schema:
- "testdata/schema.graphql"
exec:
filename: testdata/singlefile/out/ignored.go
model:
filename: testdata/singlefile/out/generated.go
resolver:
type: CustomResolverType
layout: follow-schema
dir: testdata/resolvertemplate/out
filename_template: "{name}.resolvers.go"
resolver_template: "testdata/resolvertemplate/customResolverTemplate.gotpl"
models:
Resolver:
model: github.com/99designs/gqlgen/plugin/resolvergen/testdata/singlefile/out.Resolver
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.