Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.07k stars 107 forks source link

Can't handle bindings where package name contains a dash #231

Closed tayloramman closed 1 year ago

tayloramman commented 1 year ago

Describe the bug When a type from a package with a hyphen in it's name is specified in the bindings section in genqlient.yaml code generation fails with error "genqlient internal error: failed to gofmt code"

To Reproduce Specify a binding where the type has a hyphen in it's package name, try and generate code.

Expected behavior An alias for the package name with a hyphen should be aliased and that alias used in the code.

genqlient version Not sure how to find this

Additional context Add any other context about the problem here.

benjaminjkraft commented 1 year ago

Great find! Just sent #232 to fix this.