This repository was archived by the owner on Sep 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
This repository was archived by the owner on Sep 3, 2021. It is now read-only.
Syntax error in the generated query after upgrading to 2.16.4 #527
Copy link
Copy link
Open
Description
Hello,
I recently updated from the version 2.7.2 to 2.16.4 and this caused a lot of my queries to fail with error like this
"Invalid input ']': expected whitespace, comment or an expression
This is the debug output:
{"errors":[{"message":"Invalid input ']': expected whitespace, comment or an expression (line 1, column 3667 (offset: 3666))\n\"WITH apoc.cypher.runFirstColumn(\"MATCH(:Person {id: $personId})-[:HAS|HAS_MEMBER]-(project:Project {id: $projectId}) RETURN project\", {offset:$offset, first:$first, personId:$personId, projectId:$projectId}, True) AS x UNWIND x AS `project` RETURN `project` { .id , .title , .status , .type ,creationDate: { formatted: toString(`project`.creationDate) },lastModifiedDate: { formatted: toString(`project`.lastModifiedDate) },pendingInvitations: [ project_pendingInvitations IN apoc.cypher.runFirstColumn(\"MATCH (this)-[:HAS_INVITATION]->(i:Invitation { isArchived: false, status: \\\"PENDING\\\" }) WHERE datetime(i.reminderDate) < datetime() RETURN i \", {this: project}, true) | project_pendingInvitations { .id , .status ,reminderDate: { formatted: toString(`project_pendingInvitations`.reminderDate) },creator: head([(`project_pendingInvitations`)-[:`HAS_CREATOR`]->(`project_pendingInvitations_creator`:`Person`) | `project_pendingInvitations_creator` { .id }]) ,invitee: [ project_pendingInvitations_invitee IN apoc.cypher.runFirstColumn(\" MATCH (this)-[:HAS_INVITEE]->(person:Person) WHERE NOT exists(person.isArchived) OR NOT person.isArchived=true RETURN person \", {this: project_pendingInvitations}, true) | project_pendingInvitations_invitee { .id , .fullName }] }] ,invitations: [(`project`)-[:`HAS_INVITATION`]->(`project_invitations`:`Invitation`) | `project_invitations` { .id }] ,members: [(`project`)-[:`HAS_MEMBER`]->(`project_members`:`Person`) | `project_members` { .id , .accountId , .fullName , .keyName , .abbreviatedName , .description , .emailAddress , .authStatus ,creationDate: { formatted: toString(`project_members`.creationDate) },imageDepictions: [(`project_members`)<-[:`DEPICTS`]-(`project_members_imageDepictions`:`Image`) | `project_members_imageDepictions` { .id , .title , .type ,thumbnail: [ project_members_imageDepictions_thumbnail IN apoc.cypher.runFirstColumn(\" MATCH (this)-[:HAS_THUMBNAIL]->(thumb) WHERE thumb.isArchived=false RETURN thumb \", {this: project_members_imageDepictions}, true) | project_members_imageDepictions_thumbnail { .id ,file: [(`project_members_imageDepictions_thumbnail`)-[:`IN_FILE`]->(`project_members_imageDepictions_thumbnail_file`:`File`) | `project_members_imageDepictions_thumbnail_file` { .uri }] }] }] ,invitationsReceived: [(`project_members`)<-[:`HAS_INVITEE`]-(`project_members_invitationsReceived`:`Invitation`) | `project_members_invitationsReceived` { .id ,creator: head([(`project_members_invitationsReceived`)-[:`HAS_CREATOR`]->(`project_members_invitationsReceived_creator`:`Person`) | `project_members_invitationsReceived_creator` { .id }]) }] }] ,owners: [(`project`)<-[:`HAS`]-(`project_owners`:`Party`) WHERE (\"Person\" IN labels(`project_owners`)) | head([`project_owners` IN [`project_owners`] WHERE \"Person\" IN labels(`project_owners`) | `project_owners` { FRAGMENT_TYPE: \"Person\", .id , .accountId , .fullName , .keyName , .abbreviatedName , .description , .emailAddress , .authStatus ,imageDepictions: [(`project_owners`)<-[:`DEPICTS`]-(`project_owners_imageDepictions`:`Image`) | `project_owners_imageDepictions` { .id , .title , .type ,thumbnail: [ project_owners_imageDepictions_thumbnail IN apoc.cypher.runFirstColumn(\" MATCH (this)-[:HAS_THUMBNAIL]->(thumb) WHERE thumb.isArchived=false RETURN thumb \", {this: project_owners_imageDepictions}, true) | project_owners_imageDepictions_thumbnail { .id ,file: [(`project_owners_imageDepictions_thumbnail`)-[:`IN_FILE`]->(`project_owners_imageDepictions_thumbnail_file`:`File`) | `project_owners_imageDepictions_thumbnail_file` { .uri }] }] }] }])] ,resources: [(`project`)-[:`HAS_RESOURCE`]->(`project_resources`:`Resource`) | ] ,comments: [ project_comments IN apoc.cypher.runFirstColumn(\" MATCH (this)<-[:COMMENT_ON]-(com) WHERE com.isArchived=false RETURN com ORDER BY com.lastModifiedDate desc \", {this: project}, true) | project_comments { .id , .text ,creationDate: { formatted: toString(`project_comments`.creationDate) },author: head([(`project_comments`)<-[:`COMMENTED`]-(`project_comments_author`:`Person`) | `project_comments_author` { .id , .accountId , .fullName }]) }] ,genres: [(`project`)<-[:`IN_GENRE`]-(`project_genres`:`Genre`) | `project_genres` { .id , .name }] } AS `project`\"\n ^","locations":[{"line":2,"column":3}],"path":["Project"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"code":"Neo.ClientError.Statement.SyntaxError","name":"Neo4jError"}}}],"data":{"Project":null}}
When I run this query in the neo4j browser, I get this:
Invalid input '': expected whitespace, DISTINCT, an expression or ')' (line 1, column 33 (offset: 32))
Any help is appreciated.
Eisman111 and dantestopp
Metadata
Metadata
Assignees
Labels
No labels