Forum Discussion

mogranovitch's avatar
Occasional Contributor
2 years ago

GraphQl request : extra quotes added to the Query Variables when the Query Variables is a property

Same question that was already asked couple of years ago and didn't get an answer:

When I'm populating Query Variables for GraphQL request using a saved as a property JSON object, it is sent with double quotes around it when it expected to be just a JSON object.

  • Query Variables: ${Properties#addBpVariables}
  • addBpVariables saved in the Properties: {"billingProducts":[{xxxxxxxxxxxxxxx}]}
  • Query Variables processing values: "variables":"{"billingProducts":[{xxxxxxxxxxxxxxx}]}"

As a result I'm getting back HTTP 400.

If I post into Query Variables full value stored in the Properties it is processed fine.

Question: Can I use value from the Properties (saved as a String, I assume) in the Query Variables that is expecting to get JSON object?