This is all incredibly useful, thank you!
I assume I must be doing something wrong, because when I try to alter the first example function you gave, and add it via the dashboard, I see this:
My function is:
Query(
Lambda(
["set", "size", "after", "before"],
If(
And(Not(Equals(Var("before"), null)), Not(Equals(Var("after"), null))),
Paginate(Var("set"), { size: Var("size"), before: Var("before"), after: Var("after") }),
If(
Not(Equals(Var("before"), null)),
Paginate(Var("set"), { size: Var("size"), before: Var("before") }),
If(
Not(Equals(Var("after"),null)),
Paginate(Var("set"), { size: Var("size"), after: Var("after") }),
Paginate(Var("set"), { size: Var("size") }),
)
)
)
)
)