Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-01-2020 02:21 AM
Hi,
I would like to get data from Neo4J server directly when i click on each node. how can i do that.
Below is the code in js.
neo4jDataUrl: 'json/data-movie.json',
//neo4jData: datagraph,
nodeRadius: 10,
onRelationshipDoubleClick: function(relationship) {
console.log('double click on relationship: ' + JSON.stringify(relationship));
},
onNodeDoubleClick: function (node) {
console.log(node.id)
secondQuery = {
"statements": [
{
"statement": "MATCH(n)<-[r]->(c) where ID(n)= " + node.id + " return n,c,r LIMIT 1",
"resultDataContents": ["graph"]
}
]
}
$.ajax({
url: 'http://localhost:7474/db/data/transaction/commit',
headers: {
'Authorization': 'Basic <token>',
'Content-Type': 'application/json'
},
method: 'POST',
dataType: 'json',
data: JSON.stringify(secondQuery),
success: function (data) {
neo4jd3.updateWithNeo4jData(data);
}
});
},
zoomFit: true
My issue is what is 'Authorization': 'Basic '? How can i get it this parameters value? Thank you.
headers: {
'Authorization': 'Basic <token>',*
'Content-Type': 'application/json'*
},*
All the sessions of the conference are now available online