Stash box client interface (#751)

* 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
This commit is contained in:
WithoutPants
2020-09-17 19:57:18 +10:00
committed by GitHub
parent b0b5621337
commit 7a45943e8e
324 changed files with 34978 additions and 17323 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/99designs/gqlgen/codegen/config"
"github.com/pkg/errors"
"github.com/vektah/gqlparser/ast"
"github.com/vektah/gqlparser/v2/ast"
)
type GoFieldType int
@@ -82,11 +82,9 @@ func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
}
func (o *Object) Reference() types.Type {
switch o.Type.(type) {
case *types.Pointer, *types.Slice, *types.Map:
if config.IsNilable(o.Type) {
return o.Type
}
return types.NewPointer(o.Type)
}
@@ -114,8 +112,7 @@ func (o *Object) HasUnmarshal() bool {
return true
}
for i := 0; i < o.Type.(*types.Named).NumMethods(); i++ {
switch o.Type.(*types.Named).Method(i).Name() {
case "UnmarshalGQL":
if o.Type.(*types.Named).Method(i).Name() == "UnmarshalGQL" {
return true
}
}