我正在使用https://grandstack.io/进行项目 . 目前,我试图以JSON形式的节点和链接返回结果 . 以下链接Drawing a graph using d3js from neo4j/cypher json output很有帮助,但现在我收到以下GraphQL错误:

[GraphQL错误]:消息:无法调用函数apoc.cypher.runFirstColumn:引起:org.neo4j.cypher.internal.frontend.v3_3.InternalException:期望在此处找到一个节点但找到了Map

在我的架构文件中,这就是我所拥有的:

Type Query {action(startTime: Float!, endTime: Float!): [action] @cypher(statement: "MATCH path = (sec:Second)<-[:AT_TIME]-(act:action)-[:TARGET]->(obj:object) WHERE act.timestamp >= startTime AND act.timestamp <= endTime unwind map(path) as no UNWIND rels(path) as r RETURN {nodes: collect(distinct no), links: collect(DISTINCT {source:id(startNode(r)),target:id(endNode(r))})}