neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.59k stars 324 forks source link

Error when using NeoVis version 2.1.0 to connect to Neo4j Aura version 5 #365

Closed darylfung96 closed 11 months ago

darylfung96 commented 11 months ago

Expected Behavior (Mandatory)

No error.

Actual Behavior (Mandatory)

Neo4jError: The property existence syntax ... exists(variable.property) is no longer supported. Please use variable.property IS NOT NULL instead. (line 1, column 17 (offset: 16)) "MATCH (n) WHERE exists(n.pagerank)"

How to Reproduce the Problem

I am using NeoVis version 2.1.0 and the neo4j version is 5.

Simple Example

Datasets and Statements

<html>
    <head>
        <script src="https://rawgit.com/neo4j-contrib/neovis.js/master/dist/neovis.js"></script>
        <title>Knowledge Graph</title>
    </head>
    <script>
        function draw() {
            var config = {
                container_id: "viz",
                neo4j: {
                    serverUrl: "neo4j://<dbid>.databases.neo4j.io",
                    serverUser: "neo4j",
                    serverPassword: "<password>",
                    driverConfig: { 
                    encrypted: "ENCRYPTION_ON",
                    trust: "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"
                }               
                },
                initial_cypher: "MATCH p=(:Dataset) RETURN p"
            }

            var viz = new NeoVis.default(config);
            viz.render();
        }
    </script>
    <body onload="draw()">
        <div id="viz"></div>
    </body>
</html>

Currently used versions

Versions

thebestnom commented 11 months ago

Rename initial_cypher to initialCypher

darylfung96 commented 11 months ago

Thanks! That solved the issue