You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
genqlient internal error: failed to gofmt code:
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)
680:5: expected 'IDENT', found 'type' (and 8 more errors)---source code---
The following slight change generates without issue:
Thanks for the report. I think the problem here is actually that the variable name type is reserved in Go! I'll leave this bug open to remind us to add a better error message (or munge it*) but the best thing to do is just to change the variable name in the mutation.
*in principle munging it would be nicer, especially since the argument name in Go is really just for the documentation, the user doesn't have to write it. But I'm not sure if that could cause worse collisions, possibly ones that won't get caught at type check. So an error may be easier to think about.
Describe the bug
Generate fails when building a mutation that takes enum as input.
To Reproduce
The following fails to generate:
The following slight change generates without issue:
Expected behavior
The generator should successfully complete.
genqlient version
0.4.0
The text was updated successfully, but these errors were encountered: