mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
* Use vendor code for all go calls * Add missing vendor dependencies * Add travis_retry to yarn install * Fix go test call
21 lines
617 B
Plaintext
21 lines
617 B
Plaintext
{{- range $interface := .Interfaces }}
|
|
|
|
func (ec *executionContext) _{{$interface.Name}}(ctx context.Context, sel ast.SelectionSet, obj *{{$interface.Type | ref}}) graphql.Marshaler {
|
|
switch obj := (*obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
{{- range $implementor := $interface.Implementors }}
|
|
{{- if $implementor.ValueReceiver }}
|
|
case {{$implementor.Type | ref}}:
|
|
return ec._{{$implementor.Name}}(ctx, sel, &obj)
|
|
{{- end}}
|
|
case *{{$implementor.Type | ref}}:
|
|
return ec._{{$implementor.Name}}(ctx, sel, obj)
|
|
{{- end }}
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
{{- end }}
|