diff options
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/codegen/templates/args.gotpl')
-rw-r--r-- | vendor/github.com/99designs/gqlgen/codegen/templates/args.gotpl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/99designs/gqlgen/codegen/templates/args.gotpl b/vendor/github.com/99designs/gqlgen/codegen/templates/args.gotpl new file mode 100644 index 00000000..870a99ed --- /dev/null +++ b/vendor/github.com/99designs/gqlgen/codegen/templates/args.gotpl @@ -0,0 +1,13 @@ + args := map[string]interface{}{} + {{- range $i, $arg := . }} + var arg{{$i}} {{$arg.Signature }} + if tmp, ok := rawArgs[{{$arg.GQLName|quote}}]; ok { + var err error + {{$arg.Unmarshal (print "arg" $i) "tmp" }} + if err != nil { + return nil, err + } + } + args[{{$arg.GQLName|quote}}] = arg{{$i}} + {{- end }} + return args, nil |