I’m still pretty new to Cayley. At this point, able to get quads in. Still getting my head around getting data out. I’m using the golang API. The shape or path interfaces, I understand, are the current best practice for this. (right?)
One thing I’m stuck on, getting quads or values out, filtered by label(s). I’m suspect it can be done, when I see in shape/path.go:
func HasLabels(from, via, nodes, labels Shape, rev bool) Shape
Can anyone provide an example of how to use this? It needs a Shape to produce a Shape. Chicken and egg to a beginner like me.
What I’d like to see an example of is… given the graph has several quads with the same subject, some of them labeled “one” and others labeled “two”… how can I iterate exclusively the quads labeled “one”, for that specific subject?
Thanks for any help!