mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-23 07:22:53 +03:00
06f5e4fb77
https://github.com/hasura/graphql-engine-mono/pull/1715 GitOrigin-RevId: 4818292cff8c3a5b264968e7032887a1e98b6f79
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
- description: Query the action with the inherited role
|
|
url: /v1/graphql
|
|
headers:
|
|
X-Hasura-Role: inherited_role2
|
|
status: 200
|
|
query:
|
|
query: |
|
|
mutation {
|
|
create_user (name: "bob", email: "bob@hasura.io") {
|
|
id
|
|
}
|
|
}
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
path: $
|
|
code: validation-failed
|
|
message: no mutations exist
|
|
|
|
- description: Add permission to role which will override the inherited permission
|
|
url: /v1/metadata
|
|
status: 200
|
|
query:
|
|
type: create_action_permission
|
|
args:
|
|
role: inherited_role2
|
|
action: create_user
|
|
|
|
- description: Query the action with the inherited role
|
|
url: /v1/graphql
|
|
headers:
|
|
X-Hasura-Role: inherited_role2
|
|
status: 200
|
|
query:
|
|
query: |
|
|
mutation {
|
|
create_user (name: "bob", email: "bob@hasura.io") {
|
|
id
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
create_user:
|
|
id: 1
|
|
|
|
- description: Drop the overridden permission which was added
|
|
url: /v1/metadata
|
|
status: 200
|
|
query:
|
|
type: drop_action_permission
|
|
args:
|
|
role: inherited_role2
|
|
action: create_user
|