实装 graphql
This commit is contained in:
@@ -27,9 +27,9 @@ func main() {
|
||||
http.Error(w, result.Errors[0].Error(), 500)
|
||||
return
|
||||
}
|
||||
rJSON, _ := json.MarshalIndent(result, "", " ")
|
||||
rJSON, _ := json.MarshalIndent(result.Data, "", " ")
|
||||
w.Write(rJSON)
|
||||
})
|
||||
|
||||
fmt.Println("Now server is running on port 6001")
|
||||
http.ListenAndServe(":6001", nil)
|
||||
}
|
||||
|
Reference in New Issue
Block a user