Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a property to the resolver config to allow for a full resolvergen configuration #2724

Open
penard-cb opened this issue Jul 20, 2023 · 0 comments

Comments

@penard-cb
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant