Limit and filter the number of GraphQL queries | Community
Skip to main content
Level 2
April 26, 2023
Solved

Limit and filter the number of GraphQL queries

  • April 26, 2023
  • 2 replies
  • 2130 views

Hello, good afternoon, I would like to know how we can set a limit and a maximum number of elements that we want to be sent to our application using the "limit" and "offset" parameters for paging and elements that we display.

AEM Version : 2023.3.11382.20230315T073850Z

I had read that it had been integrated into new versions in the Cloud, but the offset or the limit does not work

Is there any alternative?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ShaileshBassi

Hi @alex_terinte 
The release notes can be found from the location https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/release-notes/release-notes-current.html

According to the document, this feature is there in the release https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html?lang=en#paging

Please log a support ticket, if you are unable to use it.

Hope this helps!

Thanks

2 replies

Siva_Sogalapalli
Community Advisor
Community Advisor
April 26, 2023

did you try like this?

query {
   articleList(offset: 5, limit: 5) {
    items {
      authorFragment {
        lastName
        firstName
      }
    }
  }
}

please check for more info:  https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html#paging 

Level 2
April 26, 2023

Yeah, i tried.

 

 

Siva_Sogalapalli
Community Advisor
Community Advisor
April 26, 2023

As  I heard offset and limit parameters have been added in the latest AEM as a Cloud Service but I'm not sure whether this feature is part of the version you're using or not. 

ShaileshBassi
Community Advisor
ShaileshBassiCommunity AdvisorAccepted solution
Community Advisor
April 26, 2023

Hi @alex_terinte 
The release notes can be found from the location https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/release-notes/release-notes-current.html

According to the document, this feature is there in the release https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html?lang=en#paging

Please log a support ticket, if you are unable to use it.

Hope this helps!

Thanks

Level 2
April 27, 2023

I have installed version 2023.04 that came out about 8 days ago and that change is already incorporated.

 

Thank you very much to everyone for your help!

 

In case anyone had the same problem, please install this version : AEM SDK for AEM v2023.4.11835.20230414T234523Z-230200

And solved!