Skip to content

Commit 5f7bb0e

Browse files
committed
Update pagination token graphs
1 parent 8b3f419 commit 5f7bb0e

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

proposals/3871-gappy-timelines.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,19 @@ key | type | value | description | required
5656
Pagination tokens are positions between events. This already an established
5757
concept but to illustrate this better, see the following diagram:
5858
```
59-
pagination_token
60-
|
61-
<oldest-in-time> [0]<--[1] <gap> [gap_start_event_id]▼<--[4]<--[5]<--[6] <newest-in-time>
59+
pagination_token
60+
|
61+
<oldest-in-time> [0]<--[1]<-- <gap><--[4 (next_to_event_id)]<--[5]<--[6] <newest-in-time>
6262
```
6363

64+
The idea is to be able to keep paginating from `pagination_token` in the same
65+
direction of the request to fill in the gap.
66+
6467

6568
### `/messages` response examples
6669

70+
#### `/messages?dir=f`
71+
6772
`/messages?dir=f` response example with a gap (`chunk` has events in
6873
chronoligcal order):
6974

@@ -95,6 +100,15 @@ chronoligcal order):
95100
}
96101
```
97102

103+
```
104+
pagination_token
105+
|
106+
<oldest-in-time> [foo (next_to_event_id)]<-- ▼<gap> <--[baz] <newest-in-time>
107+
```
108+
109+
110+
#### `/messages?dir=b`
111+
98112

99113
`/messages?dir=b` response example with a gap (`chunk` has events in
100114
reverse-chronoligcal order):
@@ -127,6 +141,13 @@ reverse-chronoligcal order):
127141
}
128142
```
129143

144+
```
145+
pagination_token
146+
|
147+
<oldest-in-time> [foo]<-- <gap>▼ <--[baz (next_to_event_id)] <newest-in-time>
148+
```
149+
150+
130151

131152
## Potential issues
132153

0 commit comments

Comments
 (0)