Closed AndreiTapai closed 1 year ago
Thanks. I don't see yet how to fix it, but I will have a look at it this week.
Well my idea would be to catch a 204 on the edge request and handle it gracefully somehow and just display the one node that would be returned by the vertex request. the click query should work from that point on. I might have time this week to make a PR for this.
Yes. After catching a 204 error, a way would be to resend the request but without the edge query (since there is no edge) and setting edges = []. I put this edge query in case there are nodes sharing the same property and that are connected by edges, I want to display these edges together with the nodes.
https://github.com/bricaud/graphexp/blob/fe930a9b78d561b0afedc98b4a28cbdfc777e70a/scripts/graphioGremlin.js#L130
Connected to an Amazon Neptune backend,
SINGLE_COMMANDS_AND_NO_VARS = true
:Filtering on a vertex property
name
producesg.V().has('name', 'blah').aggregate('node').outE().as('edge').inV().where(within('node')).select('edge').toList();
The problem is that if the vertex property being filtered on is unique, the
where(within('node'))
returns an empty list of vertices. This comes out of Neptune as a204 No Content
which might not be handled correctly as nothing is rendered even though the vertex exists.