Skip to content

Commit e4ac291

Browse files
Final feedback
1 parent 5f33cb8 commit e4ac291

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

website/src/pages/en/subgraphs/querying/graphql-api.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ GraphQL queries in The Graph target entities defined in the Subgraph schema. Eac
3030

3131
> Note: The `query` keyword is not required at the top level of GraphQL queries.
3232
33-
### Single Entity Queries
33+
### Single Entity Queries Example
3434

3535
Query for a single `Token` entity:
3636

@@ -45,7 +45,7 @@ Query for a single `Token` entity:
4545

4646
> Note: Single entity queries require the `id` parameter as a string.
4747
48-
### Collection Queries
48+
### Collection Queries Example
4949

5050
Query format for all `Token` entities:
5151

@@ -58,14 +58,14 @@ Query format for all `Token` entities:
5858
}
5959
```
6060

61-
### Sorting
61+
### Sorting Example
6262

6363
Collection queries support the following sort parameters:
6464

6565
- `orderBy`: Specifies the attribute for sorting
6666
- `orderDirection`: Accepts `asc` (ascending) or `desc` (descending)
6767

68-
#### Standard Sorting
68+
#### Standard Sorting Example
6969

7070
```graphql
7171
{
@@ -76,7 +76,7 @@ Collection queries support the following sort parameters:
7676
}
7777
```
7878

79-
#### Nested Entity Sorting
79+
#### Nested Entity Sorting Example
8080

8181
```graphql
8282
{
@@ -91,7 +91,7 @@ Collection queries support the following sort parameters:
9191

9292
> Note: Nested sorting supports one-level-deep `String` or `ID` types on `@entity` and `@derivedFrom` fields.
9393
94-
### Pagination
94+
### Pagination Example
9595

9696
When querying a collection, it is best to:
9797

@@ -100,7 +100,7 @@ When querying a collection, it is best to:
100100
- Use the `skip` parameter to skip entities and paginate. For instance, `first:100` shows the first 100 entities and `first:100, skip:100` shows the next 100 entities.
101101
- Avoid using `skip` values in queries because they generally perform poorly. To retrieve a large number of items, it's best to page through entities based on an attribute as shown in the previous example above.
102102

103-
#### Standard Pagination
103+
#### Standard Pagination Example
104104

105105
```graphql
106106
{
@@ -111,7 +111,7 @@ When querying a collection, it is best to:
111111
}
112112
```
113113

114-
#### Offset Pagination
114+
#### Offset Pagination Example
115115

116116
```graphql
117117
{
@@ -122,7 +122,7 @@ When querying a collection, it is best to:
122122
}
123123
```
124124

125-
#### Cursor-based Pagination
125+
#### Cursor-based Pagination Example
126126

127127
```graphql
128128
query manyTokens($lastID: String) {
@@ -137,7 +137,7 @@ query manyTokens($lastID: String) {
137137

138138
The `where` parameter filters entities based on specified conditions.
139139

140-
#### Basic Filtering
140+
#### Basic Filtering Example
141141

142142
```graphql
143143
{
@@ -151,7 +151,7 @@ The `where` parameter filters entities based on specified conditions.
151151
}
152152
```
153153

154-
#### Numeric Comparison
154+
#### Numeric Comparison Example
155155

156156
```graphql
157157
{
@@ -163,7 +163,7 @@ The `where` parameter filters entities based on specified conditions.
163163
}
164164
```
165165

166-
#### Block-based Filtering
166+
#### Block-based Filtering Example
167167

168168
```graphql
169169
{
@@ -175,7 +175,7 @@ The `where` parameter filters entities based on specified conditions.
175175
}
176176
```
177177

178-
#### Nested Entity Filtering
178+
#### Nested Entity Filtering Example
179179

180180
```graphql
181181
{
@@ -191,7 +191,7 @@ The `where` parameter filters entities based on specified conditions.
191191

192192
#### Logical Operators
193193

194-
##### AND Operations
194+
##### AND Operations Example
195195

196196
The following example filters for challenges with `outcome` `succeeded` and `number` greater than or equal to `100`.
197197

@@ -221,7 +221,7 @@ The following example filters for challenges with `outcome` `succeeded` and `num
221221
}
222222
```
223223

224-
##### OR Operations
224+
##### OR Operations Example
225225

226226
```graphql
227227
{
@@ -241,7 +241,7 @@ Global filter parameter:
241241
_change_block(number_gte: Int)
242242
```
243243

244-
### Time-travel Queries
244+
### Time-travel Queries Example
245245

246246
Queries support historical state retrieval using the `block` parameter:
247247

@@ -250,7 +250,7 @@ Queries support historical state retrieval using the `block` parameter:
250250

251251
> Note: The current implementation is still subject to certain limitations that might violate these guarantees. The implementation can not always tell that a given block hash is not on the main chain at all, or if a query result by a block hash for a block that is not yet considered final could be influenced by a block reorganization running concurrently with the query. They do not affect the results of queries by block hash when the block is final and known to be on the main chain. [This issue](https://github.com/graphprotocol/graph-node/issues/1405) explains what these limitations are in detail.
252252
253-
#### Block Number Query
253+
#### Block Number Query Example
254254

255255
```graphql
256256
{
@@ -264,7 +264,7 @@ Queries support historical state retrieval using the `block` parameter:
264264
}
265265
```
266266

267-
#### Block Hash Query
267+
#### Block Hash Query Example
268268

269269
```graphql
270270
{
@@ -278,7 +278,7 @@ Queries support historical state retrieval using the `block` parameter:
278278
}
279279
```
280280

281-
### Full-Text Search
281+
### Full-Text Search Example
282282

283283
Full-text search query fields provide an expressive text search API that can be added to the Subgraph schema and customized. Refer to [Defining Full-text Search Fields](/developing/creating-a-subgraph/#defining-fulltext-search-fields) to add full-text search to your Subgraph.
284284

@@ -342,7 +342,7 @@ Entity types require:
342342
- `@entity` directive
343343
- `ID` field
344344

345-
### Subgraph Metadata
345+
### Subgraph Metadata Example
346346

347347
The `_Meta_` object provides subgraph metadata:
348348

0 commit comments

Comments
 (0)