0

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?

David Buck
  • 3,752
  • 35
  • 31
  • 35
Allex Radu
  • 1,257
  • 13
  • 24

1 Answers1

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