【问题标题】:Neo4j-graphql self reference type is emptyNeo4j-graphql 自引用类型为空
【发布时间】:2020-03-21 07:32:15
【问题描述】:

使用 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")
        }
`;

我总是认为被报告者是空的。关于我缺少什么的任何建议?

【问题讨论】:

    标签: neo4j graphql apollo-server neo4j-graphql-js


    【解决方案1】:

    此问题已解决 - 我的类型为 Employee,节点为 EMP。将类型更改为 EMP 就可以了。

    【讨论】:

      猜你喜欢
      • 2020-03-23
      • 2021-03-06
      • 1970-01-01
      • 2021-08-31
      • 2017-07-13
      • 1970-01-01
      • 1970-01-01
      • 2021-08-31
      • 2021-03-09
      相关资源
      最近更新 更多