@@ -22,7 +22,7 @@ First, open a GraphQL *explorer*. This example should also work with GitHub's [G
22
22
23
23
The query:
24
24
25
- ```
25
+ < pre >
26
26
query($fst:Int, $lst:Int, $aft:String, $bef:String) {
27
27
viewer {
28
28
login
@@ -32,14 +32,14 @@ query($fst:Int, $lst:Int, $aft:String, $bef:String) {
32
32
last: $lst,
33
33
after: $aft,
34
34
before: $bef) {
35
- totalCount
35
+ totalCount< strong >
36
36
# This will be necessary for navigating between the pages.
37
37
pageInfo {
38
38
hasNextPage
39
39
endCursor
40
40
hasPreviousPage
41
41
startCursor
42
- }
42
+ }</ strong >
43
43
edges {
44
44
starredAt
45
45
node {
@@ -54,7 +54,7 @@ query($fst:Int, $lst:Int, $aft:String, $bef:String) {
54
54
}
55
55
}
56
56
}
57
- ```
57
+ </ pre >
58
58
59
59
Variables needed by the query, paste this into the * query variables* pane :
60
60
@@ -69,7 +69,7 @@ Variables needed by the query, paste this into the *query variables* pane :
69
69
70
70
<details >
71
71
<summary >
72
- Here is the reply to the query above:
72
+ < strong > Here is the reply to the query above:</ strong >(< i >click to expand</ i >)
73
73
</summary >
74
74
<pre >
75
75
{
@@ -78,13 +78,13 @@ Here is the reply to the query above:
78
78
"login": "jxmot",
79
79
"name": "J.Motyl",
80
80
"starredRepositories": {
81
- "totalCount": 279,
81
+ "totalCount": 279,< strong >
82
82
"pageInfo": {
83
83
"hasNextPage": true,
84
84
"endCursor": "Y3Vyc29yOnYyOpK5MjAyMC0xMi0xNFQxMTo0Mjo0My0wNjowMM4O_J02",
85
85
"hasPreviousPage": false,
86
86
"startCursor": "Y3Vyc29yOnYyOpK5MjAyMC0xMi0xNlQxMzoyODoyMC0wNjowMM4PAfB-"
87
- },
87
+ },</ strong >
88
88
"edges": [
89
89
{
90
90
"starredAt": "2020-12-16T19:28:20Z",
@@ -127,7 +127,6 @@ Here is the reply to the query above:
127
127
</pre >
128
128
</details >
129
129
130
-
131
130
To see how pagination works use these steps:
132
131
133
132
1 ) Run the query with the data as shown below
@@ -139,9 +138,9 @@ To see how pagination works use these steps:
139
138
becomes ` false ` .
140
139
141
140
5 ) To go to the previous page copy the string from the result at ` pageInfo.startCursor ` into the ` bef ` data item
142
- 6 ) Set ` aft ` to ` null `
143
- 7 ) Set ` fst ` to ` null `
144
- 8 ) Set ` lst ` to 3
141
+ 6 ) Set ** ` aft ` ** to ` null `
142
+ 7 ) Set ** ` fst ` ** to ` null `
143
+ 8 ) Set ** ` lst ` ** to 3
145
144
9 ) Run the query again
146
145
10 ) The previous "page" will be returned
147
146
0 commit comments