Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I'm using Qlik Sense desktop and load data from an API using the REST connector. I cannot load all data at once, so I need to use pagination. The challenge here is, that GraphQL is used as query language.
My question is: How can I page data I load from a GraphQL endpoint when I have to pass the page information in the body of a POST request?
Some background information:
I send a POST request to an API endpoint and specify the data I want to be returned. This specification happens in the body of the request in the form of an stringified JavaScript object (JSON).
The answer as well is a JSON string containing the information I requested. I am mainly interested in content, but also requested pageInfo which contains hasNextPage (Bool) and totalCount (int).
The URL of the endpoint is always the same, no data is passed via URL. Pagination information cannot be sent via header (only Authorization, content-type,accept-language).
The request itself works. I just don't know how to handle the pagination.In each query, I have to manipulate the body of the request, changing the '0' to the number of the page I request.
mongoproductsearch(page:{page:0 size:10})
Size is limited to 10.000. Currently, I would haveto do ~50 requests.
Thanks!
Robin
Hi,
thanks, I was able to get it working using WITH CONNECTION.
This is my solution and what I learned on the way. In case someone stumbles upon this post:
Hi @Restless ,
I need some help with the Rest API connection to make the query dynamic. Have been able to connect with the Rest API and query a table based on the response query in the data connection but it doesn't work when i try and use with connection to query a different table. Any guidance is helpful.
Thanks!