Content Delivery API > Pagination

    Pagination

    When querying records of a specific model you can supply arguments that allow you to paginate the query response. Pagination allows you to request a certain amount of records at the same time. The default limit is 20 records, and the maximum is 100.

    Use first to limit the number of results:

    {
    allArtists(first: 5) {
    id
    name
    }
    }

    You can also skip an arbitrary amount of records by supplying the skip argument:

    {
    allArtists(first: 5, skip: 10) {
    id
    name
    }
    }

    Note: If you query more records than exist, your response will simply contain all records that actually do exist in that direction.

    Finally, to get the total number of records for a model you can query the meta object:

    {
    _allArtistsMeta {
    count
    }
    }

    so that you can compute the total number of pages.