0

I'm trying to setup the allow list feature in Hasura, but the docs seem pretty sparse. This is one of the queries:

{
  hasura_auth(args: {cleartext_password: "xxx", email: "email@mail.com"}) {
    jwt_token
  }
}

How would I integrate the dynamic parts in an allow list?

I tried this and lot's of variations with no luck:

{
  hasura_auth(args: {cleartext_password: $pass, email: $email}) {
    jwt_token
  }
}

Thanks for your help!

Andii
  • 484
  • 1
  • 4
  • 19

1 Answers1

0

What you have to know is to tell hasura the name of your query with full syntax. like this...

Operation name is => get_user_by_pk

Operation is

query get_user_by_pk($id: uuid!) {
  user_by_pk(id: $id) {
    id
    username
    email
  }
}

the main part is you have to use the exact operation in your code having the operation name.

now, in your project, you will send the variable (in this case id[uuid]) to the query handler and send this to your hasura server.

ask me if it is not clear for you.

Endriyas
  • 546
  • 6
  • 13