I am using Gremlin to query a graph stored in TitanDB.
The graph contains user vertices with properties, e.g., \"description\", and edges denoting relationships betw
You could do:
g.V('description',CONTAINS,'developer').as('user').transform{it.bothE.toList()}.as('relationship').select
in this way, you should get an empty list for those developers who don't have edges.
In TinkerPop 3.x, using the TinkerPop modern graph where I dropped edge with id 12, you would do:
gremlin> g.E(12).drop()
gremlin> g.V().hasLabel('person').as('u').
......1> map(bothE().fold()).as('r').
......2> select('u','r')
==>[u:v[1],r:[e[9][1-created->3],e[7][1-knows->2],e[8][1-knows->4]]]
==>[u:v[2],r:[e[7][1-knows->2]]]
==>[u:v[4],r:[e[10][4-created->5],e[11][4-created->3],e[8][1-knows->4]]]
==>[u:v[6],r:[]]