How to pass grpahQl query

I am 100% new to Gatling and GraphQl. Please help
Problem statement: How to hit post request for below GraphQl query
val queryGetForm = “query getForm ($recordID: String!, $showDeletedSections: Boolean, $withAttachments: Boolean) {
getForm (recordID: $recordID, showDeletedSections: $showDeletedSections, withAttachments: $withAttachments) {
}
}”

I get 400 response when use below line
.body(StringBody(“”“{ “query”: “#{queryGetForm}” }”“”))

You can diagnose and find a fix of this by turning on Debug at HTTP requests level:
https://gatling.io/docs/gatling/guides/debugging/

2 Likes