mv
02/18/2018, 3:21 PMtype Cell {
id: ID! @unique
name: String!
parent: Cell @relation(name: "CellsRelationship")
children: [Cell!]! @relation(name: "CellsRelationship")
}
And here is what I obtain when I create two cells:
1) a first with no parent (root of the structure)
2) then another with the previously created cell defined as a parent:
{
"id": "cjdswp3h40bnl0128th7xh704",
"name": "Vision",
"parent": null,
"children": []
},
{
"id": "cjdswzmjh0bwh0128tw6l18fv",
"name": "Market Channels",
"parent": {
"name": "Vision"
},
"children": [
{
"id": "cjdswp3h40bnl0128th7xh704",
"name": "Vision"
}
]
}