Open svdoever opened 4 years ago
Was able to run stuff. But what what is format of json? It is not graphson.
It is the format sent by the proxy-server.js to the front-end:-) I did some additional improvements on the proxy-server.js so other queries are handled correctly as well. I will post an updated version soon.
Did you run it against Cosmos DB, or did it work for other Gremlin servers as well?
@svdoever did you complete this? Is your fork available for me to play around with? Im playing with cosmos a bit and would like to try this out.
Hi @prabushitha, thanks for the great work on the visualizer. I had some issues with Microsoft Cosmos DB, because of the executed query
${query}${nodeLimitQuery}.dedup().as('node').project('id', 'label', 'properties', 'edges').by(__.id()).by(__.label()).by(__.valueMap().by(__.unfold())).by(__.outE().project('id', 'from', 'to', 'label', 'properties').by(__.id()).by(__.select('node').id()).by(__.inV().id()).by(__.label()).by(__.valueMap().by(__.unfold())).fold())
.It contains Gremlin constructs not supported by Cthe Cosmos DB Graph implementation of Gremlin:
by(__.valueMap().by(__.unfold())
.I created a version that works correctly for Cosmos DB Graph where I did split the query into three different queries to get it working correctly. I also added an additional endpoint in the service to request the incoming and outgoing edges. Because Cosmos B Graph contains an authenticated endpoint I configure the proxy server with an included
config.js
file:config.js:
proxy-server.js:
I also added support for sample graph visualization files without using a Gremlin server, and no support for drilling through the graph. Create next to the
proxy-server.js
file a foldersamples
, and add for example the following file:modern.json: (patterned after the graph created with
TinkerFactory.createModern()
as described in the Tinkerpop Reference DocumentationIf instead of a query the following string is specified
sample:modern
the sample JSON is read and returned.