I want to make a function named helloshortest
.
I git clone the go source from dgraph repo in github.
and do some little changes .
Here is what I have done.
git status
>
git_status.txt (538 Bytes)
git diff
>
git_diff.txt (2.3 KB)
cat query/helloshortest.go
helloshortest.go (1.3 KB)
It works.Query like this
{
foo as helloshortest(from: 0x10, to: 0x4) {
friend
}
bar(func: uid(foo)) {
name
}
}
with response
{
"extensions": {
"server_latency": {
"parsing_ns": 13978,
"processing_ns": 39104,
"encoding_ns": 480361
},
"txn": {
"start_ts": 90008
}
},
"data": {
"bar": [],
"hello shortest Path": [
{
"uid": "0x10",
"_weight_": 4
}
]
}
}
Okay, from now on, the true problem is I didn’t return a correct result.
I need to fix the code ,the function HelloShortestPath
in helloshortest.go
I want to know how to deal with the graph ,what a SubGraph
really means.
what does *pb.List
or *pb.Query
means ?
How to fetch a node 's data . or how to wallk the graph .
I need some infomation and help to complete my own helloshortest
correctlly.