Skip to content

Commit

Permalink
Any non "nil" value that casting to interface{} when returning from w…
Browse files Browse the repository at this point in the history
…ill never be == nil
  • Loading branch information
Roman A. Grigorovich committed Dec 14, 2022
1 parent 1a9a41b commit 0855439
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions codegen/field.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex
{{- end }}
}
{{- end }}
if resTmp == nil {
{{- if $field.TypeReference.GQL.NonNull }}
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
{{- end }}
return {{ $null }}
}
{{- if $object.Stream }}
return func(ctx context.Context) graphql.Marshaler {
select {
Expand Down

0 comments on commit 0855439

Please sign in to comment.