Created attachment 37720 [details] Simple example for testing Using the GraphQL HTTP Request sampler with Variables set like this: { "number": ${number} } (Note no " around the value) Results in the following error: 2021-01-26 17:07:23,695 ERROR o.a.j.p.h.u.GraphQLRequestParamUtils: Ignoring the GraphQL query variables content due to the syntax error: Unrecognized token '$': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (String)"{ "number": ${number} } "; line: 2, column: 13] And the POST Data is missing the variables: POST data: {"operationName":"Test","query":"query Test() {\n\t\n}"} Adding quotes gives the expected behaviour: POST data: {"operationName":"Test","variables":{"number":"0"},"query":"query Test() {\n\t\n}"} But the value is now passed as a string instead of a number, so is not the correct request.
Seems like the graphql sampler is parsing the JSON structure too early, i.e. when the variables are not set, yet.
https://github.com/apache/jmeter/pull/651
Should be fixed with https://github.com/apache/jmeter/pull/660 @Andy, could you test next nightly and report back?
Sorry, I've long since moved to a job where I'm not using jmeter anymore. I've passed it on to the team who are though.
@Felix, I encounted the same issue which andy encountered, and can confirm that this PR fixes this issue. Tested on 5.5, latest commit: cbacd0893ed726a37ea4134598f2016936c01d91
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5493