<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Load data from GraphQL API with REST data connector in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1558473#M3735</link>
    <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp; pagination. The challenge here is, that &lt;STRONG&gt;GraphQL&lt;/STRONG&gt; is used as query language.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;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?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some background information:&lt;/P&gt;&lt;P&gt;I send a &lt;STRONG&gt;POST request&lt;/STRONG&gt; 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 &lt;STRONG&gt;stringified JavaScript object&lt;/STRONG&gt; (JSON).&lt;/P&gt;&lt;P&gt;The answer as well is a JSON string containing the information I requested. I am mainly interested in &lt;EM&gt;content&lt;/EM&gt;, but also requested &lt;EM&gt;pageInfo&lt;/EM&gt;&amp;nbsp;which contains &lt;EM&gt;hasNextPage&lt;/EM&gt; (Bool) and &lt;EM&gt;totalCount&lt;/EM&gt; (int).&lt;/P&gt;&lt;P&gt;The&lt;STRONG&gt; URL of the endpoint is always the same&lt;/STRONG&gt;, no data is passed via URL. Pagination information cannot be sent via header (only &lt;EM&gt;Authorization, content-type,accept-language&lt;/EM&gt;).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;mongoproductsearch(page:{page:&lt;FONT color="#FF0000"&gt;0&lt;/FONT&gt; size:10})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Size is limited to 10.000. Currently, I would haveto do ~50 requests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GraphQL query and response" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8374i14A4D01C10DBE305/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_13-39-05.png" alt="GraphQL query and response" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GraphQL query and response&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="REST Connector" style="width: 611px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8375iDD2A80FC3003707D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_13-43-11.png" alt="REST Connector" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;REST Connector&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-19_14-13-32.png" style="width: 657px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8382i9F5C4C51C888265C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_14-13-32.png" alt="2019-03-19_14-13-32.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Dec 2021 20:09:52 GMT</pubDate>
    <dc:creator>Restless</dc:creator>
    <dc:date>2021-12-21T20:09:52Z</dc:date>
    <item>
      <title>Load data from GraphQL API with REST data connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1558473#M3735</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp; pagination. The challenge here is, that &lt;STRONG&gt;GraphQL&lt;/STRONG&gt; is used as query language.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;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?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some background information:&lt;/P&gt;&lt;P&gt;I send a &lt;STRONG&gt;POST request&lt;/STRONG&gt; 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 &lt;STRONG&gt;stringified JavaScript object&lt;/STRONG&gt; (JSON).&lt;/P&gt;&lt;P&gt;The answer as well is a JSON string containing the information I requested. I am mainly interested in &lt;EM&gt;content&lt;/EM&gt;, but also requested &lt;EM&gt;pageInfo&lt;/EM&gt;&amp;nbsp;which contains &lt;EM&gt;hasNextPage&lt;/EM&gt; (Bool) and &lt;EM&gt;totalCount&lt;/EM&gt; (int).&lt;/P&gt;&lt;P&gt;The&lt;STRONG&gt; URL of the endpoint is always the same&lt;/STRONG&gt;, no data is passed via URL. Pagination information cannot be sent via header (only &lt;EM&gt;Authorization, content-type,accept-language&lt;/EM&gt;).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;mongoproductsearch(page:{page:&lt;FONT color="#FF0000"&gt;0&lt;/FONT&gt; size:10})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Size is limited to 10.000. Currently, I would haveto do ~50 requests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GraphQL query and response" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8374i14A4D01C10DBE305/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_13-39-05.png" alt="GraphQL query and response" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GraphQL query and response&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="REST Connector" style="width: 611px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8375iDD2A80FC3003707D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_13-43-11.png" alt="REST Connector" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;REST Connector&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-19_14-13-32.png" style="width: 657px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8382i9F5C4C51C888265C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-19_14-13-32.png" alt="2019-03-19_14-13-32.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 20:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1558473#M3735</guid>
      <dc:creator>Restless</dc:creator>
      <dc:date>2021-12-21T20:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from GraphQL API with REST data connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1564388#M3773</link>
      <description>Hi Robin, you can modify body of a REST connection during script execution using WITH CONNECTION keyword, which provides a BODY parameter. See  &lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword" target="_blank"&gt;https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword&lt;/A&gt;</description>
      <pubDate>Wed, 03 Apr 2019 08:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1564388#M3773</guid>
      <dc:creator>Vu_Nguyen</dc:creator>
      <dc:date>2019-04-03T08:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from GraphQL API with REST data connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1565059#M3785</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, I was able to get it working using WITH CONNECTION.&lt;/P&gt;&lt;P&gt;This is my solution and what I learned on the way. In case someone stumbles upon this post:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I&amp;nbsp; use double quotes &lt;STRONG&gt;""&lt;/STRONG&gt; around the object property&amp;nbsp;&lt;EM&gt;query&lt;/EM&gt; and its value in the JSON string&lt;/LI&gt;&lt;LI&gt;In the &lt;EM&gt;query&lt;/EM&gt; value itsself I use &lt;STRONG&gt;\""&lt;/STRONG&gt; to mask the quote&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-04-04_12-16-25.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9454iAD0BC6BF7F5D401E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-04-04_12-16-25.png" alt="2019-04-04_12-16-25.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-04-04_12-17-16.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9455i3B6988C4F091787F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-04-04_12-17-16.png" alt="2019-04-04_12-17-16.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 10:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/1565059#M3785</guid>
      <dc:creator>Restless</dc:creator>
      <dc:date>2019-04-04T10:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Load data from GraphQL API with REST data connector</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/2025881#M11883</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/67445"&gt;@Restless&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 16:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Load-data-from-GraphQL-API-with-REST-data-connector/m-p/2025881#M11883</guid>
      <dc:creator>salonibhatia</dc:creator>
      <dc:date>2023-01-15T16:15:47Z</dc:date>
    </item>
  </channel>
</rss>

