Skip to content

Commit

Permalink
Small template fix to save space in the generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Lindahl committed Nov 8, 2023
1 parent c0ca509 commit 5c875fd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions codegen/input.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@
switch k {
{{- range $field := .Fields }}
case {{$field.Name|quote}}:
var err error

{{- $lhs := (printf "it.%s" $field.GoFieldName) }}
{{- if $input.IsMap }}
{{- $lhs = (printf "it[%q]" $field.Name) }}
{{- end }}

ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField({{$field.Name|quote}}))
{{- if $field.ImplDirectives }}
directive0 := func(ctx context.Context) (interface{}, error) { return ec.{{ $field.TypeReference.UnmarshalFunc }}(ctx, v) }
Expand Down

0 comments on commit 5c875fd

Please sign in to comment.