Sitecore Community GraphQL Cookbook

Search - Simple Search query

Simple search based Search GraphQL Query that finds item based on the root path, template ID, and language.
Source: Mihály Árvai
    CommunityDelivery APISearch

JSON Variables


Query


JSON Response

1{
2  "data": {
3    "item": {
4      "results": [
5        {
6          "id": "E93B1DE68747457EBE1FFAD35F232778",
7          "name": "Second Article",
8          "title": {
9            "jsonValue": {
10              "value": "Second Article"
11            }
12          },
13          "Author": {
14            "jsonValue": [
15              {
16                "id": "aea9379d-ac2e-4b9c-aee2-efb6a37a3a46",
17                "url": "/en/Authors/John-Doe",
18                "name": "John Doe",
19                "displayName": "John Doe",
20                "fields": {
21                  "First Name": {
22                    "value": "John"
23                  },
24                  "Last Name": {
25                    "value": "Doe"
26                  }
27                }
28              }
29            ]
30          },
31          "created": {
32            "jsonValue": {
33              "value": "2024-08-23T08:43:15Z"
34            }
35          },
36          "tags": {
37            "jsonValue": []
38          },
39          "url": {
40            "path": "/Articles/Second-Article"
41          }
42        },
43        {
44          "id": "FFC365956AA0412ABA262F1D82C21E81",
45          "name": "First Article",
46          "title": {
47            "jsonValue": {
48              "value": "First Article"
49            }
50          },
51          "Author": {
52            "jsonValue": [
53              {
54                "id": "aea9379d-ac2e-4b9c-aee2-efb6a37a3a46",
55                "url": "/en/Authors/John-Doe",
56                "name": "John Doe",
57                "displayName": "John Doe",
58                "fields": {
59                  "First Name": {
60                    "value": "John"
61                  },
62                  "Last Name": {
63                    "value": "Doe"
64                  }
65                }
66              }
67            ]
68          },
69          "created": {
70            "jsonValue": {
71              "value": "2024-08-23T08:43:15Z"
72            }
73          },
74          "tags": {
75            "jsonValue": []
76          },
77          "url": {
78            "path": "/Articles/First-Article"
79          }
80        }
81      ]
82    }
83  }
84}