假设我有一个称为类别的模式
categories{
Id
name
parentId
}
我将如何编写graphQL密码来获取类别和嵌套类别级别
[
{
categoryId: 173
name: "Perfumes"
levels:
[
{categoryId: 111, level: 0, categoryName: "Mens Fashion"}
{categoryId: 161, level: 1, categoryName: "Beauty & Grooming"}
{categoryId: 173, level: 2, categoryName: "Perfumes"}
]
parentInt: 161
},
{
categoryId: 154
name: "Saree"
levels:
[
{categoryId: 117, level: 0, categoryName: "Womens Fashion"}
{categoryId: 119, level: 1, categoryName: "Womens Dress"}
{categoryId: 154, level: 2, categoryName: "Saree"}
]
parentInt: 119
}
]