# Pagination with First and After Arguments

**URL:** <https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618>\
**Category:** Developing with Prismic\
**Tags:** graphql\
**Created:** [October 26, 2021, 8:15pm UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618 "2021-10-26T20:15:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahat](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rahat](https://community.prismic.io/u/rahat)\
**Post date:** [October 26, 2021, 8:15pm UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/1 "2021-10-26T20:15:59Z")

</div>

Hey all. From my understanding GraphQL requests should just return a maximum of 20 items. We did however see a work around with using the First Argument in a query. Example - we are returning 30 blog posts by specifying 30 as the number for the first argument.

Is this expected behavior? I ask because this is extremely useful for our use case but want to be sure this isn't something that might be removed at a later date.

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [October 27, 2021, 10:22am UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/3 "2021-10-27T10:22:36Z")

</div>

Hello @rahat

Welcome to the Prismic community, and thanks for reaching out to us.

The expected behavior of graphql in Prismic returns max 20 documents at one time. For getting more than 20 documents, you need to apply pagination, which is described [here](https://prismic.io/docs/paginate-your-results-graphql)

Are you getting 30 results without applying pagination?

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![rahat](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rahat](https://community.prismic.io/u/rahat)\
**Post date:** [October 27, 2021, 3:34pm UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/4 "2021-10-27T15:34:35Z")

</div>

Hi Priyanka! Yes we are able to get as many documents as we want if we pass in a number for the first argument. Like I mentioned this is extremely useful for our blog, will this remain as a feature or will it be restricted to 20 documents?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [October 29, 2021, 10:21pm UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/7 "2021-10-29T22:21:14Z")

</div>

Hey @rahat!

The GraphQL API doesn't retrieve more than 20 docs per page. But, as Priyanka mentioned, pagination will help you retrieve more than these initial 20 docs.  
Could you show us an example of your query?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [November 6, 2021, 12:38am UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/8 "2021-11-06T00:38:13Z")

</div>

closed on November 6, 2021, 12:38am UTC, flag & select 'Something Else' to reopen.



---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:19pm UTC](https://community.prismic.io/t/pagination-with-first-and-after-arguments/7618/9 "2021-12-09T15:19:11Z")

</div>

Opened on December 9, 2021, 3:19pm UTC


