0

I need to show a specific vertex with IN edges and related vertex. I tried with this but I don't have a graph

%%gremlin -p v-d,oute,inv, -d name g.V().has('name','my_value').outE().inV().path().by(elementMap())

how can I modify my command?

For example, I have created this graph vertex OUT

Now I want to show INCOMING edges and vertexs for a specific vertex

Diego R
  • 5
  • 3
  • You are mixing two sets of query hints there. the `-p` hint is only needed when you don't have a `path().by(elementMap())`. The `-d` hint is used to label nodes in the visualization. If you can add a small test graph to the question and an explanation of what you want the output to look like it will be easier to provide a tested answer. You will find an example showing an easy way to create a sample graph here: https://stackoverflow.com/questions/73546575/gremlin-sack-sum-once-per-distinct-value – Kelvin Lawrence Dec 14 '22 at 15:31
  • Hi have added my idea about the graph that I want – Diego R Dec 15 '22 at 08:27
  • The visualization will be for the `path` created in the query. You cannot expand an existing visualization. So to see the incoming edges you will need to either add that to the current query or create a new one that contains `inE` and `outV` steps. – Kelvin Lawrence Dec 15 '22 at 13:33
  • I want another query for my result – Diego R Dec 15 '22 at 13:58
  • I resolved my problem: g.V().has('name','my_name').inE().outV().path().by(elementMap()) – Diego R Dec 15 '22 at 14:15
  • I'm glad that was it. I copied my text above to the answer in case others have the same question. – Kelvin Lawrence Dec 15 '22 at 15:08

1 Answers1

0

The visualization will be for the path created in the query. You cannot expand an existing visualization currently. So to see the incoming edges you will need to either add that to the current query or create a new one that contains inE and outV steps

Kelvin Lawrence
  • 14,674
  • 2
  • 16
  • 38