Bug 64752

Summary: Add GraphQL/HTTP Request Sampler
Product: JMeter Reporter: Woonsan Ko <woonsan>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Severity: normal CC: p.mouawad, woonsan
Priority: P2 Keywords: FixedInTrunk
Version: unspecified   
Target Milestone: JMETER_5.4   
Hardware: All   
OS: All   

Description Woonsan Ko 2020-09-19 02:14:58 UTC
I have used HTTP Request sampler for GraphQL testing with setting
request body with escaped json strings like this:

{"operationName":null,"variables":{},"query":"{\n fineSomethings(text:
\"\", offset: 0, limit: 200) {\n offset\n limit\n count\n total\n
items {\n ... }\n }\n }\n }\n}\n"}

It is a bit harder to read and update than some graphql tools such as
graphql playground [1] which escapes graphql and variable json to an
escaped body under the hood.

It would be nice if we have a GraphQL Sampler with a
similar UI - separate graphql query or mutation input and variables
(json) input.

GraphQL request over HTTP supports both GET and POST methods in the specification and some implementations. [1][2]
It seem that only POST method is used in real practice though.

* Related e-mail thread: [3]

[1] https://graphql.org/learn/serving-over-http/
[2] https://www.apollographql.com/docs/apollo-server/v1/requests/
[3] https://lists.apache.org/thread.html/r43d8f18fc01bf2aca242fd757814c6440b465ffb4141e4d21fa04b34%40%3Cdev.jmeter.apache.org%3E
Comment 1 Philippe Mouawad 2020-10-04 09:09:07 UTC
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

The following commit(s) were added to refs/heads/master by this push:
     new 82e56be  BZ 64752 - Add GraphQL/HTTP Request Sampler  (#627)
82e56be is described below

commit 82e56beb04505af96d1e9ce327f67aa8eba99e06
Author: Woonsan Ko <woonsan@users.noreply.github.com>
AuthorDate: Sun Oct 4 05:06:56 2020 -0400