I'm implementing a bi-directional infinite list using useInfiniteQuery
from React Query, based on the docs. The only parameter that gets passed to the queryFn
is an object containing the page parameter (one of the two cursors).
It's not quite clear to me, in this case, how I can make my backend aware of the direction of the query (i.e. whether I want to get the records after or before the given cursor value).