Sitecore Community GraphQL Cookbook

Children items - Samples

GraphQL query to demonstrate different ways(hasLayout and includeTemplates) to retrieve children items from Experience Edge
Source:
    Delivery APIChildrenCommunity

JSON Variables


Query


JSON Response

1{
2  "data": {
3    "item": {
4      "children": {
5        "results": [
6          {
7            "id": "5BF1A38A3C0D44529FE7BC307BE87974",
8            "name": "contact-us",
9            "path": "/sitecore/content/webhook/graphql-demo/Home/about us/contact-us"
10          },
11          {
12            "id": "B0E5D65388454E65949A088025C73450",
13            "name": "Redirect",
14            "path": "/sitecore/content/webhook/graphql-demo/Home/about us/Redirect"
15          }
16        ]
17      },
18      "childrenWithLayout": {
19        "results": [
20          {
21            "id": "5BF1A38A3C0D44529FE7BC307BE87974",
22            "name": "contact-us",
23            "path": "/sitecore/content/webhook/graphql-demo/Home/about us/contact-us"
24          }
25        ]
26      },
27      "childrenWithTemplateFilter": {
28        "results": [
29          {
30            "id": "B0E5D65388454E65949A088025C73450",
31            "name": "Redirect",
32            "path": "/sitecore/content/webhook/graphql-demo/Home/about us/Redirect"
33          }
34        ]
35      }
36    }
37  }
38}