Efficient multi-level pagination in GraphQL
Pagination is necessary almost every time when an endpoint returns a list of items. While there are exceptions to this, for example when you know the number of returned items has an upper bound, it is bad API design to crash the API when it tries to return too many values. This is especially a problem with serverless applications as they enforce the “quick and small” approach by limiting the running time and the response size.
21 March 2023