Bug 64752 - Add GraphQL/HTTP Request Sampler
Summary: Add GraphQL/HTTP Request Sampler
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.4
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2020-09-19 02:14 UTC by Woonsan Ko
Modified: 2020-10-04 09:09 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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

https://github.com/apache/jmeter/commit/82e56beb04505af96d1e9ce327f67aa8eba99e06
Comment 2 The ASF infrastructure team 2022-09-24 20:38:20 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5406