1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-18 21:12:09 +03:00
graphql-engine/server/tests-py/queries/graphql_query/bigquery/setup_bigquery.yaml
2021-08-26 18:12:05 +00:00

126 lines
3.4 KiB
YAML

type: bulk
args:
- type: replace_metadata
args:
version: 3
sources:
- name: hasura_global_limited
kind: bigquery
configuration:
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
datasets:
- hasura
global_select_limit: 1
tables:
- table:
name: LimitedAlbum
dataset: hasura
object_relationships:
- name: artist
using:
manual_configuration:
remote_table:
name: LimitedArtist
dataset: hasura
column_mapping:
artist_other_id: artist_self_id
- table:
name: LimitedArtist
dataset: hasura
array_relationships:
- name: albums
using:
manual_configuration:
remote_table:
name: LimitedAlbum
dataset: hasura
column_mapping:
artist_self_id: artist_other_id
- name: hasura
kind: bigquery
configuration:
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
datasets:
- hasura
global_select_limit: 10
tables:
- table:
name: Album
dataset: hasura
object_relationships:
- name: artist
using:
manual_configuration:
remote_table:
name: Artist
dataset: hasura
column_mapping:
artist_other_id: artist_self_id
- table:
name: Artist
dataset: hasura
array_relationships:
- name: albums
using:
manual_configuration:
remote_table:
name: Album
dataset: hasura
column_mapping:
artist_self_id: artist_other_id
- table:
dataset: hasura
name: author
array_relationships:
- using:
manual_configuration:
remote_table:
name: article
dataset: hasura
column_mapping:
id: author_id
name: articles
- table:
dataset: hasura
name: article
object_relationships:
- using:
manual_configuration:
remote_table:
name: author
dataset: hasura
column_mapping:
author_id: id
name: author
select_permissions:
- role: published_only
permission:
columns: [is_published, id, title]
filter:
is_published: true
- role: exact_article_id
permission:
columns: [id, title, content]
filter:
id:
'_eq': 2
- role: empty_perms
permission:
columns: []
filter: {}
- role: user
permission:
columns: [id, title, content, author_id, is_published, published_on, created_at]
filter: {}
- role: test_timestamp_perm
permission:
columns: [id, title, content]
filter:
created_at:
'_eq': '2008-12-25T07:30:02'
- table:
dataset: hasura
name: all_types