mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
a9e3a1b4bd
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2495 GitOrigin-RevId: ef250a0796200be6b75363b4275eb8a7ae780154
40 lines
749 B
YAML
40 lines
749 B
YAML
- description: Cannot see unpublished articles
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: published_only
|
|
response:
|
|
data:
|
|
hasura_test_article: []
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_test_article (
|
|
where: { is_published: {_eq: false}}
|
|
) {
|
|
id
|
|
title
|
|
is_published
|
|
}
|
|
}
|
|
- description: Can only see published articles
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: published_only
|
|
response:
|
|
data:
|
|
hasura_test_article:
|
|
- id: '2'
|
|
title: Title 2
|
|
is_published: true
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_test_article {
|
|
id
|
|
title
|
|
is_published
|
|
}
|
|
}
|