Skip to content

Commit

Permalink
Update directive.go
Browse files Browse the repository at this point in the history
fix #860 directive arg name keyword is not converted
  • Loading branch information
lian-yue committed Oct 20, 2019
1 parent adbceee commit 2a943ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/directive.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (d *Directive) Declaration() string {
res := ucFirst(d.Name) + " func(ctx context.Context, obj interface{}, next graphql.Resolver"

for _, arg := range d.Args {
res += fmt.Sprintf(", %s %s", arg.Name, templates.CurrentImports.LookupType(arg.TypeReference.GO))
res += fmt.Sprintf(", %s %s", templates.ToGoPrivate(arg.Name), templates.CurrentImports.LookupType(arg.TypeReference.GO))
}

res += ") (res interface{}, err error)"
Expand Down

0 comments on commit 2a943ee

Please sign in to comment.