graphql-engine/server/tests-py/queries/graphql_query/bigquery/perms_published_articles.yaml
Chris Done 53fc5617cf Feature/bigquery python tests
Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com>
GitOrigin-RevId: c425f84f1c9b8e38ebbfa509b6fa9298e023f386
2021-04-22 11:32:55 +00:00

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
}
}