Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mismatch error when using apoc.cypher.runFirstColumn #819

Closed
johnymontana opened this issue Jun 5, 2018 · 0 comments
Closed

Type mismatch error when using apoc.cypher.runFirstColumn #819

johnymontana opened this issue Jun 5, 2018 · 0 comments

Comments

@johnymontana
Copy link
Contributor

johnymontana commented Jun 5, 2018

There seems to be a bug when passing parameters to apoc.cypher.runFirstColumn.

For example, this works as expected:

RETURN apoc.cypher.runFirstColumn("MATCH (a) RETURN COUNT(a)", {}, True)

However this

MATCH (a) 
WITH a LIMIT 1 
RETURN a { .* , degree: apoc.cypher.runFirstColumn("WITH {this} AS this MATCH (this)-->() RETURN COUNT (*) {limit}", {this: a, first: 3, offset: 0, limit: 5}, false) }

results in the following error:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke function `apoc.cypher.runFirstColumn`: Caused by: org.neo4j.cypher.internal.util.v3_4.SyntaxException: Invalid input '{': expected whitespace, comment, '.', node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, AS, ',', GRAPHS, SOURCE GRAPH [AS <name>], TARGET GRAPH [AS <name>], GRAPH AT <graph-url> [AS <name>], GRAPH OF <pattern> [AS <name>], GRAPH, GRAPH <graph-ref> [AS <name>], >>, ORDER, SKIP, LIMIT, LOAD CSV, FROM, INTO, START, MATCH, UNWIND, MERGE, CREATE GRAPH >>, CREATE >> GRAPH, CREATE GRAPH, CREATE, SET, DELETE GRAPHS, DELETE, REMOVE, FOREACH, WITH, CALL, PERSIST, RELOCATE, RETURN, SNAPSHOT, UNION, ';' or end of input (line 1, column 156 (offset: 155))

This was noticed when using the neo4j-graphql-js integration. See neo4j-graphql/neo4j-graphql-js#53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant