Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Limit and filter the number of GraphQL queries

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

According to the document, this feature is there in the release https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-ap...

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

Hope this helps!

Thanks

View solution in original post

6 Replies

Avatar

Community Advisor

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-ap... 

Avatar

Community Advisor

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. 

Avatar

Level 3

Exactly, as you mention, I had read exactly the same thing.

 

We are using version 2023.3.11382.20230315T073850Z in the Cloud service.

 

It is a version of the newer ones, so it should be integrated

Avatar

Correct answer by
Community Advisor

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

According to the document, this feature is there in the release https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-ap...

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

Hope this helps!

Thanks

Avatar

Level 3

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!