GRANDstack graphQL,graphdb嵌套/递归/分级调用

时间:2019-05-06 10:35:37

标签: neo4j graphql graphdb grandstack

假设我有一个称为类别的模式

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
 }
]

0 个答案:

没有答案