当前,我能够使用操作查询来查询neo4j DB并将时间戳作为参数传递{action:timestamp:1234567890}。但是,我试图构建一个新的查询,该查询执行操作查询但传递两个参数:startTime和endTime {action:startTime:0987654321,endTime:1234567890}。以下是我所拥有的,但间隔查询不起作用。有人可以提供帮助吗?谢谢。
export const typeDefs = `
type action {
action: String!
timestamp: Float!
Second: [Second] @cypher(statement: "MATCH (sec:Second)<-[:AT_TIME]-(this)-[:TARGET]->(obj:object) RETURN sec")
object: [object] @cypher(statement: "MATCH (sec:Second)<-[:AT_TIME]-(this)-[:TARGET]->(obj:object) RETURN obj")
}
type Second {
time: Float
}
type object{
filename: String!
}
type interval{
startTime: timestamp
endtime: timestamp
action: [action] @cypher (statement: "WHERE action.timestamp >= startTime AND action.timestamp <= endTime RETURN sec, action, obj")
}
type Query {
action(action: String, timestamp: Float): [action]
interval(startTime: timestamp, endTime: timestamp): [interval]
object(filename: String): [object]
Second(time: Float, action: String): [Second]
}
`;