乐园
This commit is contained in:
@@ -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"),
|
||||||
@@ -212,7 +212,8 @@ 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) {
|
||||||
|
Reference in New Issue
Block a user