@core-devs This is not related to Dgraph but with GO code.
So Im hitting “:8080/query” end point for storing “Question” Information in dgraph. After hitting it, I get data in “response.Body” variable and the response was:
{"code":"ErrorOk","message":"Done","uids":{"question":11411066080515171301}}
So even though the question has been saved, I want to query the dgraph using above uid and send all its informatin back as response, for that I created Struct :
type DgraphResponse struct { // HTTP Response
Code string
Message string
UIDS struct {
Question string
}
}
Then I decode the First Http’s response into JSON:
var dresp DgraphResponse
err = json.NewDecoder(resp.Body).Decode(dresp)
fmt.Println(dresp.Code)
fmt.Println(dresp.UIDS.Question)
But above fmt.Println giving empty output. I’ll figure out what’s wrong but let me know if you find by seeing it. Here is the full code : https://github.com/dgraph-io/gru/blob/feature/admin-backend/gruadmin/main.go
