graphql-engine/server/tests-py/queries/graphql_query/bigquery/perms_published_articles.yaml
2021-10-12 17:59:44 +00:00

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