Unfortunately that does not answer the question? The algorithm is not the issue here. The issue is how do you pass the result of a query to another query, if that result is a subgraph.
It is all about decomposing your case. My suspicion at this point is there is no way you can do that, because you can’t pass an edgset as a parameter.
1 - Solution 1: Would be to tag the vertex set or edset, and call a sub query with the taggedvertexset only, but somehow the subquery need to be aware of the tag used. by tag i just mean the accum variable and the meaning of its value used.
2 - Merge all the algorithm that you have in one global algorithm and run the all thing.
My use case for a particular demo i want to do is:
a) Select a set of node submitted as input
b) Expand the set of nodes 1 hop away and the union of the original set and the new nodes 1 hop away of each nodes, becomes the new seed set.
c)Optional add also every node in the shortest path of each pair of the original seed set, that is not in the seedset yet
c)Run a Centrality or Pangerank algorithm on that set.
I) How to structure such a program elegantly with GSQL queries capability ?
II) How to run that in stage to showcase a step by step to the user ?
Hope it make sense ?