hasura / hasura/graphql-engine

docs: document responses for insert and delete operations on permission violations

Open
#4,646 4 comments 1 reaction 1 assignee Claimed by @divyabhushan-okta View on GitHub
a/authz c/docs k/question
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

## Use-Case-One

```
mutation MyMutation {
insert_user_contacts_one(object: {contact_id: "1234567890", user_id: "2345678901"}) {
user_id
}
}
```

## Use-Case-Two

```
mutation MyMutation {
delete_user_contacts_by_pk(contact_id: "1234567890", user_id: "2345678901") {
user_id
}
}
```

## Row permissions for both use cases (insert and delete):

Screenshot 2020-05-02 at 10 02 57
Screenshot 2020-05-02 at 10 03 13

In _use case one_, I get a permission error back if x-hasura-user-id is not matching.

In _use case two_, I get an empty array back if x-hasura-user-id is not matching, instead of a permission error...

Hasura v1.2.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.