mirror of
https://github.com/stashapp/stash.git
synced 2025-12-09 09:53:40 +01:00
* Add gql client generation files * Update dependencies * Add stash-box client generation to the makefile * Move scraped scene object matchers to models * Add stash-box to scrape with dropdown * Add scrape scene from fingerprint in UI
21 lines
612 B
Text
21 lines
612 B
Text
{{- 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 }}
|
|
case {{$implementor.Type | ref}}:
|
|
{{- if $implementor.CanBeNil }}
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
{{- end }}
|
|
return ec._{{$implementor.Name}}(ctx, sel, {{ if $implementor.TakeRef }}&{{ end }}obj)
|
|
{{- end }}
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
{{- end }}
|