<?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 Issue with REST Connector Script - Graphql in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-REST-Connector-Script-Graphql/m-p/2157121#M1695</link>
    <description>&lt;P&gt;Hi Qlik Community,&lt;/P&gt;
&lt;P&gt;I am currently facing a challenge with the implementation of a script involving a REST connector. Specifically, the query works as expected when entered within the request body box of the REST connector, but encounters difficulties when incorporated into a script.&lt;/P&gt;
&lt;P&gt;The variable &lt;CODE&gt;v_cursor&lt;/CODE&gt; serves as a key that dynamically changes with each execution and&amp;nbsp;comes from the previous query.&lt;/P&gt;
&lt;P&gt;I would greatly appreciate any guidance or assistance you could provide in resolving this matter.&lt;/P&gt;
&lt;P&gt;Below is the relevant script snippet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LET v_cursor = Peek('cursor', 0, 'items_page');&lt;/P&gt;
&lt;P&gt;// STEP 2 - Next item page&lt;BR /&gt;LET v_next_page_body = ' "{""query"":""{next_items_page(cursor: $(v_cursor) ) { cursor items { id name column_values { column { title } text } }}""}" ';&lt;/P&gt;
&lt;P&gt;// The query that works inside the box:&lt;/P&gt;
&lt;P&gt;// { "query": "{ next_items_page(cursor: \"MSwxNjM2MjU3NzkzLG9tV2VnQVpfWnJCVnFLNEZQMzFaeCw5MTgsMjUsfDEyNjkxMzAzMTg\" ) { cursor items { id name column_values { column { title } text } }}"}&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"account_id",&lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT &lt;BR /&gt;"__KEY_data",&lt;BR /&gt;"__FK_data",&lt;BR /&gt;(SELECT &lt;BR /&gt;"cursor",&lt;BR /&gt;"__KEY_next_items_page",&lt;BR /&gt;"__FK_next_items_page",&lt;BR /&gt;(SELECT &lt;BR /&gt;"id",&lt;BR /&gt;"name",&lt;BR /&gt;"__KEY_items",&lt;BR /&gt;"__FK_items",&lt;BR /&gt;(SELECT &lt;BR /&gt;"text",&lt;BR /&gt;"__KEY_column_values",&lt;BR /&gt;"__FK_column_values",&lt;BR /&gt;(SELECT &lt;BR /&gt;"title",&lt;BR /&gt;"__FK_column"&lt;BR /&gt;FROM "column" FK "__FK_column")&lt;BR /&gt;FROM "column_values" PK "__KEY_column_values" FK "__FK_column_values")&lt;BR /&gt;FROM "items" PK "__KEY_items" FK "__FK_items")&lt;BR /&gt;FROM "next_items_page" PK "__KEY_next_items_page" FK "__FK_next_items_page")&lt;BR /&gt;FROM "data" PK "__KEY_data" FK "__FK_data")&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;BR /&gt;WITH CONNECTION(&lt;BR /&gt;Url "&lt;A href="https://api.monday.com/v2" target="_blank" rel="noopener"&gt;https://api.monday.com/v2&lt;/A&gt;",&lt;BR /&gt;HTTPHEADER "Authorization" $(v_auth),&lt;BR /&gt;HTTPHEADER "Content-Type" "application/json",&lt;BR /&gt;HTTPHEADER "API-Version" "2023-10",&lt;BR /&gt;BODY $(v_next_page_body)&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 22:43:16 GMT</pubDate>
    <dc:creator>Tuval</dc:creator>
    <dc:date>2025-03-19T22:43:16Z</dc:date>
    <item>
      <title>Issue with REST Connector Script - Graphql</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-REST-Connector-Script-Graphql/m-p/2157121#M1695</link>
      <description>&lt;P&gt;Hi Qlik Community,&lt;/P&gt;
&lt;P&gt;I am currently facing a challenge with the implementation of a script involving a REST connector. Specifically, the query works as expected when entered within the request body box of the REST connector, but encounters difficulties when incorporated into a script.&lt;/P&gt;
&lt;P&gt;The variable &lt;CODE&gt;v_cursor&lt;/CODE&gt; serves as a key that dynamically changes with each execution and&amp;nbsp;comes from the previous query.&lt;/P&gt;
&lt;P&gt;I would greatly appreciate any guidance or assistance you could provide in resolving this matter.&lt;/P&gt;
&lt;P&gt;Below is the relevant script snippet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LET v_cursor = Peek('cursor', 0, 'items_page');&lt;/P&gt;
&lt;P&gt;// STEP 2 - Next item page&lt;BR /&gt;LET v_next_page_body = ' "{""query"":""{next_items_page(cursor: $(v_cursor) ) { cursor items { id name column_values { column { title } text } }}""}" ';&lt;/P&gt;
&lt;P&gt;// The query that works inside the box:&lt;/P&gt;
&lt;P&gt;// { "query": "{ next_items_page(cursor: \"MSwxNjM2MjU3NzkzLG9tV2VnQVpfWnJCVnFLNEZQMzFaeCw5MTgsMjUsfDEyNjkxMzAzMTg\" ) { cursor items { id name column_values { column { title } text } }}"}&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"account_id",&lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT &lt;BR /&gt;"__KEY_data",&lt;BR /&gt;"__FK_data",&lt;BR /&gt;(SELECT &lt;BR /&gt;"cursor",&lt;BR /&gt;"__KEY_next_items_page",&lt;BR /&gt;"__FK_next_items_page",&lt;BR /&gt;(SELECT &lt;BR /&gt;"id",&lt;BR /&gt;"name",&lt;BR /&gt;"__KEY_items",&lt;BR /&gt;"__FK_items",&lt;BR /&gt;(SELECT &lt;BR /&gt;"text",&lt;BR /&gt;"__KEY_column_values",&lt;BR /&gt;"__FK_column_values",&lt;BR /&gt;(SELECT &lt;BR /&gt;"title",&lt;BR /&gt;"__FK_column"&lt;BR /&gt;FROM "column" FK "__FK_column")&lt;BR /&gt;FROM "column_values" PK "__KEY_column_values" FK "__FK_column_values")&lt;BR /&gt;FROM "items" PK "__KEY_items" FK "__FK_items")&lt;BR /&gt;FROM "next_items_page" PK "__KEY_next_items_page" FK "__FK_next_items_page")&lt;BR /&gt;FROM "data" PK "__KEY_data" FK "__FK_data")&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;BR /&gt;WITH CONNECTION(&lt;BR /&gt;Url "&lt;A href="https://api.monday.com/v2" target="_blank" rel="noopener"&gt;https://api.monday.com/v2&lt;/A&gt;",&lt;BR /&gt;HTTPHEADER "Authorization" $(v_auth),&lt;BR /&gt;HTTPHEADER "Content-Type" "application/json",&lt;BR /&gt;HTTPHEADER "API-Version" "2023-10",&lt;BR /&gt;BODY $(v_next_page_body)&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 22:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Issue-with-REST-Connector-Script-Graphql/m-p/2157121#M1695</guid>
      <dc:creator>Tuval</dc:creator>
      <dc:date>2025-03-19T22:43:16Z</dc:date>
    </item>
  </channel>
</rss>

