Skip to content

Commit

Permalink
Merge pull request 99designs#907 from lian-yue/patch-1
Browse files Browse the repository at this point in the history
fix 99designs#860 directive arg name keyword is not converted
  • Loading branch information
vektah authored Oct 28, 2019
2 parents 927cc1e + d89bb4a commit 64da08c
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 64da08c

Please sign in to comment.