Skip to content

Commit

Permalink
fix unexpected ctx variable capture on Tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
vvakame committed Nov 9, 2018
1 parent 4bda3bc commit 5c28d01
Show file tree
Hide file tree
Showing 13 changed files with 492 additions and 492 deletions.
2 changes: 1 addition & 1 deletion codegen/templates/data.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codegen/templates/field.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// nolint: vetshadow
func (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField, {{if not $object.Root}}obj *{{$object.FullName}}{{end}}) graphql.Marshaler {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
defer ec.Tracer.EndFieldExecution(ctx)
defer func () { ec.Tracer.EndFieldExecution(ctx) }()
{{- if $field.Args }}
rawArgs := field.ArgumentMap(ec.Variables)
args, err := {{ $field.ArgsFunc }}(rawArgs)
Expand Down
Loading

0 comments on commit 5c28d01

Please sign in to comment.