This commit is contained in:
2023-12-07 03:28:31 +08:00
parent 5af7f0d5c1
commit bac22ff47a

View File

@@ -191,7 +191,7 @@ func main() {
return return
} }
// Schema // graphql Schema
schema, err := api.NewSchema(api.Config{ schema, err := api.NewSchema(api.Config{
Mysql: api.ConfigMysql{ Mysql: api.ConfigMysql{
Host: config.GetString("mysql.host"), Host: config.GetString("mysql.host"),
@@ -211,8 +211,9 @@ func main() {
}) })
http.Handle("/api", handler.New(&handler.Config{ http.Handle("/api", handler.New(&handler.Config{
Schema: &schema, Schema: &schema,
Pretty: true, Playground: true,
Pretty: false,
})) }))
//http.HandleFunc("/api", func(w http.ResponseWriter, r *http.Request) { //http.HandleFunc("/api", func(w http.ResponseWriter, r *http.Request) {