mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-21 06:21:39 +03:00
53fc5617cf
Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com> GitOrigin-RevId: c425f84f1c9b8e38ebbfa509b6fa9298e023f386
40 lines
729 B
YAML
40 lines
729 B
YAML
- description: Cannot see unpublished articles
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: published_only
|
|
response:
|
|
data:
|
|
hasura_article: []
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_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_article:
|
|
- id: '2'
|
|
title: Title 2
|
|
is_published: true
|
|
query:
|
|
query: |
|
|
query {
|
|
hasura_article {
|
|
id
|
|
title
|
|
is_published
|
|
}
|
|
}
|