Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
kakooo16
Creator
Creator

How to use Graphql query with Talend?

My query is defined :

context.query = ("{\"query\":\"query { psr { product_simples ( merchant_ids: [\"marchent_id\"],product_simple_ids: [\"product_simple\"]) { ean , merchant_product_simple_id,product_simple_id , offers { stock { amount } country { code } status_detail_codes fulfillment_type } } }\n}\"}"

) ;

In Postman am getting the right response but when using talend im getting this error :

|errorCode|errorMessage | |=--------+

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=|

|400 |{ "title": "Bad Request", "flow_id": "87GqcP1m9KGiNO2A", "detail": "Unexpected token b in JSON at position 58", "contact": "zdirect-tech-support@zalando.de", "

 

code": 400 }|

 

To explain more im passing this "context.query"(String) into a json field (tRESTclient) .

 

My job is as such :

 

0683p000009M9S6.png

 

Greetings .

Labels (2)
12 Replies
kakooo16
Creator
Creator
Author

If you could provide me more details on how to do that .
Thanks
kakooo16
Creator
Creator
Author

I've found an easy solution and it's to pass the query in a tREST . 

I'm passing this topic to solved ! .

Thanks

TalendUser1242
Contributor
Contributor

@not specified not specified​ - Would you be able to post the screenshot of how you passed the Query in the tRest Component ?