We should be able to do something like:
Paginate(
Match(Index("myIndex"), "287789708167086593"),
{
size: 20,
after: If(
IsEmpty(Var('nextToken')),
null,
Ref(Collection('myCollection'), Var('nextToken'))
)
}
);
Currently, if we do this, we will get an empty array as data, which is not desirable. after = null
should be the same as after
not being provided, so it should start from the beginning.