How to set PARAM variable inside JSON Data?

Hey guys, hope everyone is doing fine :sunny:

have setup server side API like so


with a Hasura Endpoint as you can clearly see… the thing is that I’m trying to add a $_PARAM or $_POST variable value into the JSON Data specified and shown there… I’m trying to do it this way and it’s not working:

Any idea how will I be able to connect my variable to a JSON Data?

here is the JSON data::

{
  "query": "mutation vote { update_candidatos(_inc: {votos: 1}, where: {id: {_eq: {{$_POST.candidateid}}}}) { returning { id votos partido_politico nombre image_url}}}"
}

And also, this is how I’m sending the data client side:

Any help is greatly appreciated! :+1:

Hi,
Query parameters, as seen in your last screenshot become available in the SA under $_GET.

Also, in case pf confusion, a quick way to check where’s what is to add a set value step, and set its value to get, post, param, header etc to see the values with a test sc.load(),and then configure the SA.

1 Like

Oh that’s pretty cool! thank you so much for your help, everything works flawlessly now :smiley: !!! and thanks for the suggestion, it’s a really nice point!

1 Like