path.Intersect()


#1

Is there currently a way to add a predicate or tag which specifies the field on which a join occurs instead of on the node itself?

It would help in the case where one of the two paths has changed the data via Tag or Save where they would not match if they were compared like for like but would if you could choose the comparison field to be ‘id’ for example.


#2

Sorry for the late reply, but if it’s still an issue, it may make sense to use shape package to build those queries.

path library is limited because it’s a set of helpers. shape on the other hand will let you control the query more precisely. It also has some helpers like Out and Save (which path libs calls under the hood).

Let me know if you need more details.


#3

Is there a way to leverage this shape package through the http api?


#4

No, but you can use our GraphQL dialect to achieve the same. It works well to get any tree-shaped results, but it’s not as flexible as Gizmo in terms of traversals. I would suggest to run the first part of the query (like following some path) in Gizmo, and then loading the structure around the results using GraphQL dialect.