使用apollo和neo4j-graphql-js在graphql上尝试neo4j。这是我的typeDefs:
const typeDefs = `
type Employee {
eid: ID!
name: String!
title: String!
email: String
reportees: [Employee] @relation(name: "REPORTS_TO", direction: "IN")
}
type Query {
getAllEmployees: [Employee] @cypher(statement: "MATCH (n) RETURN n")
getEmployee(name: String): [Employee] @cypher(statement: "MATCH (e:EMP) WHERE e.name contains $name RETURN e")
}
`;
我总是让举报人为空。关于我所缺少的任何建议吗?
答案 0 :(得分:0)
此问题已解决-我的类型为Employee,节点的类型为EMP。将类型更改为EMP可以解决问题。