aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
317 stars 47 forks source link

Connecting to non-neptune TinkerPop db #33

Closed yuvallb closed 1 year ago

yuvallb commented 1 year ago

Trying to connect to a TinkerPop database, I get the error "Synchronization Required It is necessary to synchronize the connection to be able to work with the database." Looking into network calls, I see it tries to query g.V().groupCount().by(label) which is refused with the error message: Could not find a suitable index to answer graph query and graph scans are disabled

Seems like an index on label is required to run graph-explorer

bechbd commented 1 year ago

What TinkerPop database are you running against?

yuvallb commented 1 year ago

JanusGraph It has a specific setting to disable queries that do not use an index

krlawrence commented 1 year ago

Are you able to enable full graph scans for the near term? The GraphExplorer does not try to interrogate the back end currently to see what indexes exist. Also, as far as I am aware, JanusGraph does not support indexing a label (or at least it did not back when I used it more regularly).

yuvallb commented 1 year ago

After enabling full graph scans, it seems to work. The connection page takes some time to load, but it does show the number of nodes and edges, with nodes by label. In the graph explorer, when I click on the search bar - I get a blank screen with a react error:

Screenshot 2023-01-13 103708
otnt commented 1 year ago

The same error happened to me as well when connecting to a gremlin server.

krlawrence commented 1 year ago

@otnt Which database backend were you using, was it also JanusGraph? Are you still seeing the issue with the latest version of Graph Explorer? @yuvallb were you ever able to get it working with JanusGraph after enabling full graph scans? Just checking for any more information before taking a deeper look at this one. Several fixes and improvements have been made in the meantime that may also help with this issue.

krlawrence commented 1 year ago

I was able to reproduce the issue pretty much as described. Using:

  1. JanusGraph 0.6.3 running with a Gremlin Server using the WsAndHttpsChannelizer and an in-memory graph. Everything else pretty much defaults.
  2. Graph Explorer built to use HTTP rather than HTTPS (just to make connecting easier)
  3. The schema of my small test graph was correctly fetched
  4. The minute I clicked in the search bar of the Explorer an exception was thrown and the browser window went to just a white background with nothing else.
krlawrence commented 1 year ago

Issue #55 is potentially related to this issue. It may not be the root cause but given the ID scheme used by JanusGraph the fix for that issue will also be required before JanusGraph fully works with GraphExplorer.

krlawrence commented 1 year ago

I built a version of Graph Explorer using the current PR #60 (which fixes issue #55) and was able to get data to display using Janus Graph. Once PR is completed and #60 merges, this issue can hopefully be resolved/closed.

cubeddu commented 1 year ago

Looks like issue has been resolved. please re-open if it's not the case.