Sitecore Community GraphQL Cookbook

Get the root item of a site

The Experience Edge schema does not currently allow querying of sites and their root items, but you can still find the root item of a site by using the layout query.
Source: Sitecore
    Sitecore DocumentationDelivery API

Query


JSON Response

1{
2  "data": {
3    "layout": {
4      "item": {
5        "homeItemPath": "/sitecore/content/Experience-Edge/home",
6        "contentRoot": {
7          "id": "5AAA894246145088B7AD604B4D177B39",
8          "path": "/sitecore/content/Experience-Edge"
9        }
10      }
11    }
12  }
13}