Posts

Showing posts with the label Search Pagination

Understanding Search Query With Pagination Using GraphQL In XM Cloud

Image
Hello Everyone, In this blog we will see how we can implement search query using GraphQL and implement pagination.GraphQL uses cursor based system to handle pagination whenever we execute a search query. We will see this in action. Let's understand this with a common use-case which every developers encounters. We are having Blog pages or Article pages. We want to get all blogs or articles based on some conditions. The blogs or articles should be sorted based on published date. At first, we just want to show n number of items from the result. Then on load more, we need to show the remaining items. Let's jump quickly into action. We will open GraphQL IDE and dive into writing the query. I am using local XM Cloud. Required thing to execute query. GraphQL IDE : "https://xmcloudcm.localhost/sitecore/api/graph/edge/ide" Api Key: We can get it from Sitecore instance under mentioned path. Path: /sitecore/system/Settings/Services/API Keys. In above image, it give...