0

这样的事情可取吗?

GetConversationsByMember(userId: ID!): [Conversation]
    @cypher(
        statement: """
            MATCH (u:User {id: $userId})-[:IN_CONVERSATION]->(c:Conversation)-[:NEWEST_MESSAGE]->(newestMessage)
            SET c.hasReadNewest = EXISTS((u)-[:HAS_READ]->(newestMessage))
            RETURN c
    """)

hasReadNewest在节点上有属性Conversation,我想在获取用户的所有对话时动态设置它。现在我遇到了这个错误Neo4jError: Set property for property 'hasReadNewest' is not allowed for user 'neo4j' with roles [PUBLIC, admin] restricted to READ.并完全质疑这种方法。

4

0 回答 0