I'm trying to find any documentation with examples to authenticate to hasura on heroku in python and query and mutate data, I couldn't find any info on this topic, can you guy please help me?
Asked
Active
Viewed 330 times
1 Answers
1
I think what you can do is send, just like in the other languages, a request to your hasura endpoint and add the header x-hasura-admin-secret and your secret key.
{
headers: {
'content-type': 'application/json',
'x-hasura-admin-secret': configuration.ACCESS_KEY,
},
url: 'https://myapp.herokuapp.com/v1/graphql',
body: JSON.stringify({
query: mutation,
variables: { userId, name, email, avatar },
}),
}

JoralmoPro
- 11
- 1
- 1
-
Your answer is useful l but I'm still not quite sure how to implement this in python. Thanks. – Allex Radu May 21 '20 at 03:15
-
@AllexRadu you can try with https://requests.readthedocs.io/en/master/ – JoralmoPro May 21 '20 at 18:20