kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
29 stars 5 forks source link

Results of `MATCH` .. with `OPTIONAL MATCH` are not rendered #100

Closed bigluck closed 6 months ago

bigluck commented 6 months ago

Something odd seems to happen when using OPTIONAL MATCH.

I'm using the latest version of the explorer (0.3.2) via docker.

This query produces a graph:

MATCH
    (n:PhyTask)<-[r:UsedByPPTask]-(m:Fn),
    (a:Artifact)-[r2:IsInputArtifactOf]-(m)
RETURN *
Screenshot 2024-03-14 at 17 53 31

But when using OPTIONAL MATCH:

MATCH
    (n:PhyTask)<-[r:UsedByPPTask]-(m:Fn)
OPTIONAL MATCH
    (a:Artifact)-[r2:IsInputArtifactOf]-(m)
RETURN *

the explorer fails with this error on the console:

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 't.table')
    encodeNodeId (index.e594caef.js:1:415135)
    h (index.e594caef.js:1:415341)
    (anonymous function) (index.e594caef.js:1:416495)
    forEach
    extractGraphFromQueryResult (index.e594caef.js:1:416429)
    drawGraph (index.e594caef.js:1:412494)
    (anonymous function) (index.e594caef.js:1:429219)
Screenshot 2024-03-14 at 17 54 20

even if the cypher endpoint responded with some rows (and their content is visible on the table view):

Screenshot 2024-03-14 at 17 56 01
mewim commented 6 months ago

This looks like a bug. I'll look into it. Would it be possible for you to share a minimum reproducible example with me?

bigluck commented 6 months ago

Of course, ping me on discord