Skip to content

Commit

Permalink
update recursive middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
asamusev committed Dec 1, 2018
1 parent 8b3e634 commit 3a729cc
Show file tree
Hide file tree
Showing 5 changed files with 242 additions and 241 deletions.
15 changes: 1 addition & 14 deletions codegen/templates/args.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,7 @@
{{ end }}

{{- if $arg.IsInput }}
{{ if $arg.IsPtr }}
if arg{{$i}} != nil {
arg{{$i}}, err = e.{{ .GQLType }}Middleware(ctx, arg{{$i}})
if err != nil {
return nil, err
}
}
{{ else }}
args{{$i}}, err := e.{{ .GQLType }}Middleware(ctx, &arg{{$i}})
if err != nil {
return nil, err
}
arg{{$i}} = *args{{$i}}
{{ end }}
{{ $arg.Middleware (print "arg" $i) (print "arg" $i) }}
{{- end }}

{{ else }}
Expand Down
Loading

0 comments on commit 3a729cc

Please sign in to comment.