1{{- $interface := . }}
2
3func (ec *executionContext) _{{$interface.GQLType}}(ctx context.Context, sel []query.Selection, obj *{{$interface.FullName}}) graphql.Marshaler {
4 switch obj := (*obj).(type) {
5 case nil:
6 return graphql.Null
7 {{- range $implementor := $interface.Implementors }}
8 {{- if $implementor.ValueReceiver }}
9 case {{$implementor.FullName}}:
10 return ec._{{$implementor.GQLType}}(ctx, sel, &obj)
11 {{- end}}
12 case *{{$implementor.FullName}}:
13 return ec._{{$implementor.GQLType}}(ctx, sel, obj)
14 {{- end }}
15 default:
16 panic(fmt.Errorf("unexpected type %T", obj))
17 }
18}