Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-04-2020 08:49 PM
I used http api (Neo4j 3.5.x with apoc 3.5.x) to create apoc.create.vNode is able to return json format normally, the syntax is as follows:
{
"statements": [
{
"statement": "MATCH (n:Movie)-[r]-(x:Person) WHERE id(n) =$fn WITH n as jsx, n.title as fn CALL apoc.create.vNode(['country'],{name:fn}) yield node as a CALL apoc.create.vRelationship(jsx, 'relationship',{amount:1},a) yield rel return jsx,rel,a",
"parameters": {
"props": {
"fn": 95
}
},
"resultDataContents": [
"row",
"graph"
],
"includeStats": true
}
]
}
And the result json (part)
"graph": {
"nodes": [
{
"id": "-15",
"labels": [
"ai_country"
],
"properties": {
"a1_name": "The Birdcage"
}
},
{
"id": "95",
"labels": [
"Movie"
],
"properties": {
"tagline": "Come as you are",
"title": "The Birdcage",
"released": 1996
}
}
],
"relationships": [
{
"id": "-15",
"type": "relationship",
"startNode": "95",
"endNode": "-15",
"properties": {
"amount": 1
}
}
]
}
But when I upgraded to noe4j 4.x (with apoc 4.x), It isn't working, the result as follow (part)
"errors": [
{
"code": "Neo.ClientError.Statement.EntityNotFound",
"message": "Unable to load RELATIONSHIP with id -249."
}
]
But both Neo4j browser app (3.5.x, 4.x) use the same syntax and both work fine.
Do you have any suggestions?
09-07-2020 02:03 PM
This could be an issue with the Cypher querying. Do you have any prior constraints set up in your working database before running into the error?
09-08-2020 05:48 AM
Thank you for reply.
I use bolt to get the data and then convert it to json format
All the sessions of the conference are now available online