How to write the postgres sql body in Hasura data api to get some result by taking input from user. The sql query is like"Select moviedetails from table name where movie_name='name enterd by user'.I want to know the structure to accept data from user
url = "https://data.incipiently69.hasura-app.io/v1/query"
This is the json payload for the query
requestPayload = { "type": "select", "args": { "table": "collect", "columns": [ "overview" ] } }
Setting headers
headers = { "Content-Type": "application/json" }
Make the query and store response in resp
resp = requests.request("POST", url, data=json.dumps(requestPayload), headers=headers)
resp.content contains the json response.
print(resp.content)