Alexey Kim 2 years ago
parent
commit
fd79274b0a
2 changed files with 20 additions and 2 deletions
  1. 19 1
      cmd/main.go
  2. 1 1
      tools.go

+ 19 - 1
cmd/main.go

@@ -38,7 +38,7 @@ func main() {
 
 	for _, module := range modules {
 		if err := generate(module); err != nil {
-			_, _ = fmt.Fprintf(os.Stderr, err.Error())
+			_, _ = fmt.Fprintf(os.Stderr, "%s\n", err.Error())
 			os.Exit(2)
 		}
 	}
@@ -93,5 +93,23 @@ func makeConfig(m admin_api.Module) *config.Config {
 	cfg.SchemaFilename = config.StringList{
 		fmt.Sprintf("subgraph/%s.tpl", m), "ext/*.graphql"}
 
+	//cfg.Models = map[string]config.TypeMapEntry{
+	//	"DateTime": {
+	//		Model: config.StringList{"github.com/gshopify/service-wrapper/scalar.DateTime"},
+	//	},
+	//	"LanguageCode": {
+	//		Model: config.StringList{"github.com/gshopify/service-wrapper/model.LanguageCode"},
+	//	},
+	//	"CountryCode": {
+	//		Model: config.StringList{"github.com/gshopify/service-wrapper/model.CountryCode"},
+	//	},
+	//	"UnsignedInt64": {
+	//		Model: config.StringList{"github.com/gshopify/service-wrapper/model.UInt"},
+	//	},
+	//	"Decimal": {
+	//		Model: config.StringList{"github.com/gshopify/service-wrapper/scalar.Decimal"},
+	//	},
+	//}
+
 	return cfg
 }

+ 1 - 1
tools.go

@@ -1,7 +1,7 @@
 //go:build tools
 // +build tools
 
-package customer
+package admin_api
 
 import (
 	_ "github.com/99designs/gqlgen"