
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load data from GraphQL API with REST data connector
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
GraphQL query and response
REST Connector
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a post helps resolve your issue, please mark the answer as correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a post helps resolve your issue, please mark the answer as correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- I use double quotes "" around the object property query and its value in the JSON string
- In the query value itsself I use \"" to mask the quote

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
