stash/vendor/github.com/Yamashou/gqlgenc/main.go
WithoutPants 7a45943e8e
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
2020-09-17 19:57:18 +10:00

27 lines
575 B
Go

package main
import (
"context"
"fmt"
"os"
"github.com/99designs/gqlgen/api"
"github.com/Yamashou/gqlgenc/clientgen"
"github.com/Yamashou/gqlgenc/config"
"github.com/Yamashou/gqlgenc/generator"
)
func main() {
ctx := context.Background()
cfg, err := config.LoadConfig(".gqlgenc.yml")
if err != nil {
fmt.Fprintf(os.Stderr, "%+v", err.Error())
os.Exit(2)
}
clientPlugin := clientgen.New(cfg.Query, cfg.Client)
if err := generator.Generate(ctx, cfg, api.AddPlugin(clientPlugin)); err != nil {
fmt.Fprintf(os.Stderr, "%+v", err.Error())
os.Exit(4)
}
}