I think the title says it all. I'm building a social networking platform that allows for posting things and being able to create infinite sub posts (comments, and comments on comments). I can currently create the posts just fine, but I think for the GETS I need some sort of .repeat or recursive loop built in in order to keep finding subs-posts and then ultimately map them to c# classes (with nested lists of the sub-posts).
Dictionary<string, string> communityQueries = new Dictionary<string, string>
{
{
"GetPost", "g.V('" + postId + "').as('mainpost')" +
".repeat(outE().inV().hasLabel('post'))"
}
};
This was my first go to, I've been working on a couple variations but haven't quite gotten it.
In this image you can see roughly what it looks like.
Pretty simplified, the end result needs to look like this:
{
"Post (content)"
"AuthorId"
"Comments" : [
{
"Post":
"AuthorId"
"Comments"...
}...
]
}