使用 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")
}
`;
我总是把记者说成是空的。关于我所缺少的任何建议?