<?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 Re: How to use Graphql query with Talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352246#M118671</link>
    <description>&lt;P&gt;Hi @hiba chaieb​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems this json is malformed. Here's some things I've noticed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Its first element is encapsulated between quotes correctly (i.e.: &lt;B&gt;\"query\"&lt;/B&gt;), while many other element names aren't.&lt;/LI&gt;&lt;LI&gt;There are too many escaped backslashes in some places like access: \\\"21962\\\". I suggest you use this instead: &lt;B&gt; \"access\": \"21962\"&lt;/B&gt; ...&lt;/LI&gt;&lt;LI&gt;The String is not closing correctly to concatenate the token stored in globalMap. Try this instead:  &lt;B&gt;token: \"" + (String)globalMap.get("token") + "\",&lt;/B&gt; ...&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Mon, 10 Jul 2023 21:27:51 GMT</pubDate>
    <dc:creator>anselmopeixoto</dc:creator>
    <dc:date>2023-07-10T21:27:51Z</dc:date>
    <item>
      <title>How to use Graphql query with Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352243#M118668</link>
      <description>&lt;P&gt;Hi Talend Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use graphQL query with talend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use tRest component. at first, it works.&lt;/P&gt;&lt;P&gt;This is the body:&lt;/P&gt;&lt;P&gt;"{ \"query\": \"query { hotelX { hotels(criteria: { access: \\\"21962\\\", maxSize: 500, hotelCodes: [\\\"\\\"] }, token: \\\"\\\", relay: {}) { token edges { node { code hotelData { hotelCode hotelCodeSupplier hotelName categoryCode rank location { address city zipCode country coordinates { latitude longitude } } medias { code order type updatedAt url texts { text language } } } } } } } }\" }" &lt;/P&gt;&lt;P&gt;The problem is that the token should be dynamic.&lt;/P&gt;&lt;P&gt;it tries this :&lt;/P&gt;&lt;P&gt;"{ \"query\": \"query { hotelX { hotels(criteria: { access: \\\"21962\\\", maxSize: 500, hotelCodes: [\\\"\\\"] }, token: \\\"\\\", relay: {}) { token edges { node { code hotelData { hotelCode hotelCodeSupplier hotelName categoryCode rank location { address city zipCode country coordinates { latitude longitude } } medias { code order type updatedAt url texts { text language } } } } } } } }\" }"&lt;/P&gt;&lt;P&gt;But it returns | Body&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| {"data":null,"errors":[{"message":"Expected ',' or '}' after property value in JSON at position 138"}]} |&lt;/P&gt;&lt;P&gt;| ERROR_CODE | 400&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please on this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352243#M118668</guid>
      <dc:creator>hiba1</dc:creator>
      <dc:date>2024-11-15T21:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Graphql query with Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352244#M118669</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I don't see the difference between the first body string and second  body string? You want to pass a dynamic token value to the body string?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 04:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352244#M118669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-06T04:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Graphql query with Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352245#M118670</link>
      <description>&lt;P&gt;Hi @Shicong Hong​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want to pass a dynamic token value to the body string?  &lt;B&gt;==&amp;gt; Yes &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try this one but I got an error:&lt;/P&gt;&lt;P&gt;"{ \"query\": \"query { hotelX { hotels(criteria: { access: \\\"21962\\\", maxSize: 500, hotelCodes: [\\\"\\\"] }, token: \\\"\" + (String)globalMap.get(\"token\") + \"\\\", relay: {}) { token edges { node { code hotelData { hotelCode hotelCodeSupplier hotelName categoryCode rank location { address city zipCode country coordinates { latitude longitude } } medias { code order type updatedAt url texts { text language } } } } } } }\" }"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 07:54:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352245#M118670</guid>
      <dc:creator>hiba1</dc:creator>
      <dc:date>2023-07-10T07:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Graphql query with Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352246#M118671</link>
      <description>&lt;P&gt;Hi @hiba chaieb​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems this json is malformed. Here's some things I've noticed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Its first element is encapsulated between quotes correctly (i.e.: &lt;B&gt;\"query\"&lt;/B&gt;), while many other element names aren't.&lt;/LI&gt;&lt;LI&gt;There are too many escaped backslashes in some places like access: \\\"21962\\\". I suggest you use this instead: &lt;B&gt; \"access\": \"21962\"&lt;/B&gt; ...&lt;/LI&gt;&lt;LI&gt;The String is not closing correctly to concatenate the token stored in globalMap. Try this instead:  &lt;B&gt;token: \"" + (String)globalMap.get("token") + "\",&lt;/B&gt; ...&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 10 Jul 2023 21:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-Graphql-query-with-Talend/m-p/2352246#M118671</guid>
      <dc:creator>anselmopeixoto</dc:creator>
      <dc:date>2023-07-10T21:27:51Z</dc:date>
    </item>
  </channel>
</rss>

