// I tried sending mutation as json
val testAPIScenario = scenario("Sample test")
.exec(http("graph ql sample test")
.post("https://demo.com/")
.body(RawFileBody("./src/gatling/resources/graphql/sample.json")).asJson
.header("content-type",value = "application/json")
.check(status.is(200))
)
val testAPIScenario = scenario("Sample test")
.exec(http("graph ql sample test")
.post("https://demo.com/")
.body(StringBody("\"query\":\""+getMutation()+"\",\"variables\":"+getVariables()+"}")).asJson
.header("content-type",value = "application/json")
.check(status.is(200))
)
Also tried sending it using an ElFileBody, keeping mutation in a text file.
Just need to know if there is any way I can send graphQl mutation in gatling body
I checked in logs, Request is properly going on graphql but it is giving me 400, I think there is some format issue please guide me