Handling graphql requests with JMeter 4.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling graphql requests with JMeter 4.0

Prateek Dua
Hi Team,

Any help to send Post request ( query ) for  graphql using JMeter 4.0 via  HTTP request.  Attached is  query & GRAPHQL variables that needs to be passed in body data. 


Thanks,
Prateek

The contents of this email, including the attachments, are privileged and confidential to the intended recipient at the email address to which it has been addressed. If you receive it in error, please notify the sender immediately by return email and then permanently delete it from your system. The unauthorized use, distribution, copying or alteration of this email, including the attachments, is strictly forbidden. Please note that neither the sender nor the company accepts any responsibility for viruses and it is your responsibility to scan the email and attachments (if any).


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Handling graphql requests with JMeter 4.0

glinius@live.com
You need to basically send a JSON Object with "query" attribute and put the
GraphQL query there making sure to properly escape the query itself so it
would be a valid JSON.

In general  according to JMeter Best Practices you should always use the
latest version of JMeter
<https://jmeter.apache.org/usermanual/best-practices.html#use_latest_version>  
and  JMeter 5.4
<https://www.blazemeter.com/blog/introducing-jmeter5-4-new-features-and-abilities>  
and above come with  GraphQL HTTP Request
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request>  
sampler where you can put your GraphQL query as it is without having to
encode something.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]