Skip to content

Commit

Permalink
Update pagination token graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Oct 7, 2022
1 parent 8b3f419 commit 5f7bb0e
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions proposals/3871-gappy-timelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ key | type | value | description | required
Pagination tokens are positions between events. This already an established
concept but to illustrate this better, see the following diagram:
```
pagination_token
|
<oldest-in-time> [0]<--[1] <gap> [gap_start_event_id]▼<--[4]<--[5]<--[6] <newest-in-time>
pagination_token
|
<oldest-in-time> [0]<--[1]<-- <gap><--[4 (next_to_event_id)]<--[5]<--[6] <newest-in-time>
```

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


### `/messages` response examples

#### `/messages?dir=f`

`/messages?dir=f` response example with a gap (`chunk` has events in
chronoligcal order):

Expand Down Expand Up @@ -95,6 +100,15 @@ chronoligcal order):
}
```

```
pagination_token
|
<oldest-in-time> [foo (next_to_event_id)]<-- ▼<gap> <--[baz] <newest-in-time>
```


#### `/messages?dir=b`


`/messages?dir=b` response example with a gap (`chunk` has events in
reverse-chronoligcal order):
Expand Down Expand Up @@ -127,6 +141,13 @@ reverse-chronoligcal order):
}
```

```
pagination_token
|
<oldest-in-time> [foo]<-- <gap>▼ <--[baz (next_to_event_id)] <newest-in-time>
```



## Potential issues

Expand Down

0 comments on commit 5f7bb0e

Please sign in to comment.