Skip to content

Support keyset pagination for GraphQL API using search_after ES filter argument

Elastic search support search_after argument in the search filtering arguments, we can leverage it to achieve keyset pagination for the GraphQL APIs.

See: #505446 (comment 2428799164) for details

Implementation plan:

  1. The new ES finder would return a ActiveRecord_Relation, add more support in the finder to support the keyset pagination arguments from GraphQL.
  2. The finder passes these paging arguments and calls the Query builder which would use search_after filtering argument in ES to perform the paginated search.
Edited by Bala Kumar