0

With the use of Authorization, the error occurs but not when x-hasura-admin-secret is used. I am trying to insert an individual user.

Output:

{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.insert_users.args.objects",
        "code": "permission-error"
      },
      "message": "check constraint of an insert/update permission has failed"
    }
  ]
}

This is my query.

mutation MyMutation {
  insert_users(objects: {email: "ss", first_name: "dcy", last_name: "bc", public_address: "dfutdiytdg", user_id: "hcjh"}, on_conflict: {constraint: users_email_key}) {
    affected_rows
    returning {
      id
      first_name
      email
    }
  }
}

In my users permission, both update and insert have all toggled on.

SOHAM
  • 395
  • 1
  • 2
  • 8

0 Answers0