Member-only story

Optimizing AEM GraphQL Queries: Why I Choose to Use Cursor-Based Pagination

It’s just a minor feature; but are you using it right?

Jade Fariscal
4 min readOct 25, 2024

What is Pagination?

Pagination is something you encounter every day online. I’m 100% sure It’s a part of your daily browsing.

In Layman’s Terms, Pagination is simply breaking up a lot of information into smaller, easier-to-handle chunks across multiple pages. It is what lets you click ‘Next’ or see pages numbered at the bottom of a website, so you are not overwhelmed with too much content all at once.

Behind the scenes, developers like me are obsessed with Pagination because it balances data load, keeps websites running smoothly and efficiently. While you may only see a “Next” button as a user, there’s a lot of strategy for us to make your online experience smoother.

My Experience in Pagination

At first, I wasn’t too worried about it. Pagination is easy implementation. Or so I thought. I soon discovered two pagination strategies in AEM: limit-offset and cursor-based pagination. I worked through both before landing on the best solution for my needs.

Limit Offset VS Cursor-Based Pagination

Before, my first approach was to use the Limit and Offset Pagination. I started with this simple…

--

--

No responses yet