You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
If I create a custom @cypher query on the root query type in my schema with no arguments, it throws an error. This appears to be due to the fact that without query arguments, the second field of apoc.cypher.runFirstColumn is empty.
I have the following in my schema:
type Album implements SongCollection {
id: ID!
name: String!
songs: [Song!]! @cypher(statement: "MATCH (this)-[r:HAS_SONG]->(s:Song) RETURN s ORDER BY r.number")
imageName: String
artists: [Artist!]! @relation(name: "BY_ARTIST", direction: "OUT")
songRelations: [SongAlbumRelation!]!
}
type Query {
PopularAlbums: [Album!]! @cypher(statement: "Match (a:Album) return a ORDER BY a.name")
}
If I make the this query:
query {
PopularAlbums {
name
}
}
I get this error:
{
"errors": [
{
"message": "Invalid input ',': expected whitespace, comment or an expression (line 1, column 77 (offset: 76))\n\"WITH apoc.cypher.runFirstColumn(\"Match (a:Album) return a ORDER BY a.name\", , True) AS x UNWIND x AS `album`\"\n ^",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"PopularAlbums"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"code": "Neo.ClientError.Statement.SyntaxError",
"name": "Neo4jError",
"stacktrace": [
"Neo4jError: Invalid input ',': expected whitespace, comment or an expression (line 1, column 77 (offset: 76))",
"\"WITH apoc.cypher.runFirstColumn(\"Match (a:Album) return a ORDER BY a.name\", , True) AS x UNWIND x AS `album`\"",
" ^",
"",
" at captureStacktrace (/Users/smkhalsa/code/kundalini-server/node_modules/neo4j-driver/lib/v1/result.js:200:15)",
" at new Result (/Users/smkhalsa/code/kundalini-server/node_modules/neo4j-driver/lib/v1/result.js:73:19)",
" at Session._run (/Users/smkhalsa/code/kundalini-server/node_modules/neo4j-driver/lib/v1/session.js:173:14)",
" at Session.run (/Users/smkhalsa/code/kundalini-server/node_modules/neo4j-driver/lib/v1/session.js:154:19)",
" at _callee$ (/Users/smkhalsa/code/kundalini-server/node_modules/neo4j-graphql-js/dist/index.js:60:28)",
" at tryCatch (/Users/smkhalsa/code/kundalini-server/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)",
" at Generator.invoke [as _invoke] (/Users/smkhalsa/code/kundalini-server/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)",
" at Generator.prototype.(anonymous function) [as next] (/Users/smkhalsa/code/kundalini-server/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)",
" at step (/Users/smkhalsa/code/kundalini-server/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)",
" at /Users/smkhalsa/code/kundalini-server/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14"
]
}
}
}
],
"data": null
}
The text was updated successfully, but these errors were encountered:
If I create a custom @cypher query on the root query type in my schema with no arguments, it throws an error. This appears to be due to the fact that without query arguments, the second field of
apoc.cypher.runFirstColumn
is empty.I have the following in my schema:
If I make the this query:
I get this error:
The text was updated successfully, but these errors were encountered: