You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Prateek Dua <pr...@go-mmt.com.INVALID> on 2021/03/09 13:08:13 UTC

Handling graphql requests with JMeter 4.0

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).

Re: Handling graphql requests with JMeter 4.0

Posted by "glinius@live.com" <gl...@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: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org