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

Use embedded templates in root file generation #3168

Open
barr-code opened this issue Jul 2, 2024 · 2 comments
Open

Use embedded templates in root file generation #3168

barr-code opened this issue Jul 2, 2024 · 2 comments

Comments

@barr-code
Copy link
Contributor

What happened?

When a binary is shipped with gqlgen as one of its dependencies, with the follow-schema option set in the config, the following error is encountered:

open <your file structure path>/github.com/99designs/gqlgen@v0.17.42/codegen/root_.gotpl: no such file or directory

What did you expect?

The fix for issue 2260 offers the ability to pass in a TemplateFS option. However, that option is not being honored by the generateRootFile function. I would expect the same logic that was implemented here to apply in generateRootFile.

versions

  • go run github.com/99designs/gqlgen version?
    v0.17.42

  • go version?
    go 1.22.4

@clayne11
Copy link
Contributor

That makes sense, feel free to PR.

@barr-code
Copy link
Contributor Author

That makes sense, feel free to PR.

Thanks! I opened a PR to resolve this issue: #3319

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

2 participants