cancel
Showing results for 
Search instead for 
Did you mean: 

API POST using Graphql

SilvioGerstenbe
Level 3
Are there any possibilities or experiences in using Graphql in blue prism?

The Graphl ql API says, that there is no query provided but it is shown in the post body in bp. In postman the query is working fine.


Hope you can help me or have a helping hint for me.

BR Silvio

------------------------------
Silvio Gerstenberger
RPA Developer
Schneider Electric
Europe/London
------------------------------
3 REPLIES 3

sravangoud
Level 2
Hi Silvio,
I have started working on graph QL  API recently, don't know whether you need it or not now.
The exception "there is no query provided" is due to passing the multiline json data in the body or request payload. To pass the multiline data, we need to use \n instead of writing text in a newline.
For example:
{
    "query":"{
                          rockets {
                                country
                                description
                                diameter {
                                               feet
                                              meters
                                               }
                                          }
                            }"
}

This needs to be written in Blue Prism in expression editor as follows:

"{""query"":""{\n rockets{\n country\n description\n diameter{\n feet\n meters\n}\n}\n}""}"

A basic implementation of the API POST in graph QL is available in the below link. Please find it as a reference.
API POST in Graph QL using Blue Prism



------------------------------
sravan goud
------------------------------
Sravan Goud RPA Developer Tata Consultancy Services | Hyderabad sravan.goud3@outlook.com

ewilson
Staff
Staff
As @sravangoud implied, GraphQL is a bit more formal with regards to input than your average RESTful service. Here's an example of a simple public service I created a quick Web API service definition for as a test:

29941.png
Note, the query portion of the body must be created essentially as a string with embedded newlines. You can test against this same public service and view it's schema here: https://countries.trevorblades.com/

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

EVIPUTI
MVP

@SilvioGerstenbe The below link should help .

https://www.graphqltoolbox.com/s/blue-prism



------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------