Hi all, Does anyone know on how to multi paginate ...
# integrations
k
Hi all, Does anyone know on how to multi paginate a graphql query on Celigo. I need to be able to paginate all line_items if hasNextPage, then would need to paginate shipment if hasNextPage.
Copy code
query {
  shipments(date_from:"2023-04-18T9:13:00") {
    request_id
    complexity
    data(first:30,  after:"{{export.http.paging.token}}") {
     pageInfo {
        hasNextPage
        endCursor
      }
      line_items(first: 20) {
            pageInfo {
            hasNextPage
            endCursor
            }
       node...
   }
}
m
Hi @Ken, check this KB article response out, where one of our (Celigo’s) PMs shows how to do this for a similar API. Are you also using Shopify? https://docs.celigo.com/hc/en-us/community/posts/6061415030811/comments/6062144144795
👍 1
t
@Ken so it looks like you are getting shipment headers, then lines? And you need to 1, page through the headers, then 2, page through the lines if needed, right? You would most likely need to have an initial export step to get the headers, then create a lookup step to get lines associated with the header shipment. This is because each step only has 1 paging setup that you can specify.
👍 1