mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
Use 'hasura' as dataset in python test to unify it with hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3636 GitOrigin-RevId: f4114fded09cbdd9875488610c635537478e4ab5
This commit is contained in:
parent
8d0eb6b812
commit
960cf2d954
@ -92,7 +92,7 @@ function add_bigquery_source() {
|
||||
"from_env": "HASURA_BIGQUERY_SERVICE_ACCOUNT"
|
||||
},
|
||||
"project_id": { "from_env": "HASURA_BIGQUERY_PROJECT_ID" },
|
||||
"datasets": ["hasura_test"]
|
||||
"datasets": ["hasura"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -104,7 +104,7 @@ function add_bigquery_source() {
|
||||
"from_env": "HASURA_BIGQUERY_SERVICE_ACCOUNT"
|
||||
},
|
||||
"project_id": { "from_env": "HASURA_BIGQUERY_PROJECT_ID" },
|
||||
"datasets": ["hasura_test"]
|
||||
"datasets": ["hasura"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -117,7 +117,7 @@ function add_bigquery_source() {
|
||||
"from_env": "HASURA_BIGQUERY_SERVICE_ACCOUNT"
|
||||
},
|
||||
"project_id": { "from_env": "HASURA_BIGQUERY_PROJECT_ID" },
|
||||
"datasets": ["hasura_test"]
|
||||
"datasets": ["hasura"]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
author:
|
||||
@ -75,7 +75,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article(order_by: {id: asc}) {
|
||||
hasura_article(order_by: {id: asc}) {
|
||||
id
|
||||
title
|
||||
author {
|
||||
@ -100,7 +100,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles_aggregate:
|
||||
@ -123,7 +123,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author(order_by: {id: asc}) {
|
||||
hasura_author(order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
articles_aggregate(order_by: {id: asc}) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article2:
|
||||
hasura_article2:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
content: Content 1
|
||||
@ -31,7 +31,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article2 (order_by: {id: asc}) {
|
||||
hasura_article2 (order_by: {id: asc}) {
|
||||
id
|
||||
title
|
||||
content
|
||||
@ -47,7 +47,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles2:
|
||||
@ -69,7 +69,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
articles2(order_by: {id: asc}) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
created_at: '2008-12-25T07:30:01Z'
|
||||
@ -34,7 +34,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article(distinct_on: [author_id, is_published], order_by: [{author_id:asc}, {is_published: asc}, {created_at: asc}]) {
|
||||
hasura_article(distinct_on: [author_id, is_published], order_by: [{author_id:asc}, {is_published: asc}, {created_at: asc}]) {
|
||||
id
|
||||
title
|
||||
created_at
|
||||
@ -55,7 +55,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -79,7 +79,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author(order_by: [{id:asc}]) {
|
||||
hasura_author(order_by: [{id:asc}]) {
|
||||
id
|
||||
name
|
||||
articles(distinct_on: is_published, order_by: [{is_published: asc}, {created_at: asc}]) {
|
||||
@ -101,7 +101,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -125,7 +125,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author(order_by: [{id:asc}]) {
|
||||
hasura_author(order_by: [{id:asc}]) {
|
||||
id
|
||||
name
|
||||
articles(distinct_on: is_published, order_by: [{is_published: asc}, {created_at: desc}]) {
|
||||
@ -164,11 +164,11 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
first: hasura_test_article(distinct_on: [author_id, is_published], order_by: [{author_id: asc}, {is_published: asc}, {created_at: asc}]) {
|
||||
first: hasura_article(distinct_on: [author_id, is_published], order_by: [{author_id: asc}, {is_published: asc}, {created_at: asc}]) {
|
||||
id
|
||||
title
|
||||
}
|
||||
last: hasura_test_article(distinct_on: [author_id, is_published], order_by: [{author_id: asc}, {is_published: asc}, {created_at: desc}]) {
|
||||
last: hasura_article(distinct_on: [author_id, is_published], order_by: [{author_id: asc}, {is_published: asc}, {created_at: desc}]) {
|
||||
id
|
||||
title
|
||||
}
|
||||
|
@ -7,13 +7,13 @@
|
||||
response:
|
||||
errors:
|
||||
- extensions:
|
||||
path: $.selectionSet.hasura_test_article.selectionSet.id
|
||||
path: $.selectionSet.hasura_article.selectionSet.id
|
||||
code: validation-failed
|
||||
message: "field \"id\" not found in type: 'hasura_test_article'"
|
||||
message: "field \"id\" not found in type: 'hasura_article'"
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article {
|
||||
hasura_article {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -5,11 +5,11 @@
|
||||
X-Hasura-Role: exact_article_id
|
||||
response:
|
||||
data:
|
||||
hasura_test_article: []
|
||||
hasura_article: []
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article (
|
||||
hasura_article (
|
||||
where: { id: {_eq: 1}}
|
||||
) {
|
||||
id
|
||||
@ -24,14 +24,14 @@
|
||||
X-Hasura-Role: exact_article_id
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '2'
|
||||
title: Title 2
|
||||
content: Content 2
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article {
|
||||
hasura_article {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -3,24 +3,24 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_LimitedAlbum:
|
||||
hasura_LimitedAlbum:
|
||||
- album_self_id: '2000'
|
||||
query:
|
||||
query: |
|
||||
query MyQuery {hasura_test_LimitedAlbum(limit: 5, order_by: {album_self_id: asc}) {album_self_id}}
|
||||
query MyQuery {hasura_LimitedAlbum(limit: 5, order_by: {album_self_id: asc}) {album_self_id}}
|
||||
|
||||
- description: Check that global limits apply for nodes
|
||||
url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_LimitedAlbum_aggregate:
|
||||
hasura_LimitedAlbum_aggregate:
|
||||
nodes:
|
||||
- album_self_id: '2000'
|
||||
query:
|
||||
query: |
|
||||
query MyQuery {
|
||||
hasura_test_LimitedAlbum_aggregate(order_by: {album_self_id: asc}) {
|
||||
hasura_LimitedAlbum_aggregate(order_by: {album_self_id: asc}) {
|
||||
nodes {
|
||||
album_self_id
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -44,7 +44,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
articles (order_by: {id: asc}){
|
||||
@ -68,7 +68,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -102,7 +102,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
articles (order_by: {id:asc}){
|
||||
@ -123,7 +123,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -152,7 +152,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
articles (order_by: {id:asc}){
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
content: Content 1
|
||||
@ -31,7 +31,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article (order_by: {id: asc}) {
|
||||
hasura_article (order_by: {id: asc}) {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
content: Content 1
|
||||
@ -19,7 +19,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article (order_by: {id: asc}, where: {author: {name: {_eq: "Author 1"}}}) {
|
||||
hasura_article (order_by: {id: asc}, where: {author: {name: {_eq: "Author 1"}}}) {
|
||||
id
|
||||
title
|
||||
content
|
||||
@ -35,7 +35,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
content: Content 1
|
||||
@ -51,7 +51,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article (order_by: {id: asc}, where: {author: {name: {_eq: "Author 1"}, id: {_in: [1]}}}) {
|
||||
hasura_article (order_by: {id: asc}, where: {author: {name: {_eq: "Author 1"}, id: {_in: [1]}}}) {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
author:
|
||||
id: '1'
|
||||
@ -18,7 +18,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article(where: {id: {_eq: 1}}) {
|
||||
hasura_article(where: {id: {_eq: 1}}) {
|
||||
id
|
||||
author {
|
||||
id
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
@ -13,7 +13,7 @@ response:
|
||||
query:
|
||||
query: |-
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}, where: {name: {_eq: "Author 1"}}) {
|
||||
hasura_author (order_by: {id: asc}, where: {name: {_eq: "Author 1"}}) {
|
||||
id
|
||||
name
|
||||
articles (order_by: {id: asc},
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_Artist:
|
||||
hasura_Artist:
|
||||
- artist_self_id: '1000'
|
||||
albums_aggregate:
|
||||
nodes:
|
||||
@ -25,7 +25,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_Artist(order_by: {artist_self_id: asc}) {
|
||||
hasura_Artist(order_by: {artist_self_id: asc}) {
|
||||
artist_self_id
|
||||
albums_aggregate(order_by: {album_self_id: asc}, limit: 1) {
|
||||
nodes {
|
||||
@ -43,7 +43,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_Artist:
|
||||
hasura_Artist:
|
||||
- artist_self_id: '1000'
|
||||
albums_aggregate:
|
||||
nodes:
|
||||
@ -74,7 +74,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_Artist(order_by: {artist_self_id: asc}) {
|
||||
hasura_Artist(order_by: {artist_self_id: asc}) {
|
||||
artist_self_id
|
||||
albums_aggregate(order_by: {album_self_id: asc}) {
|
||||
nodes {
|
||||
@ -95,7 +95,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_Artist:
|
||||
hasura_Artist:
|
||||
- artist_self_id: '1000'
|
||||
albums_aggregate:
|
||||
nodes:
|
||||
@ -123,7 +123,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_Artist(order_by: {artist_self_id: asc}) {
|
||||
hasura_Artist(order_by: {artist_self_id: asc}) {
|
||||
artist_self_id
|
||||
albums_aggregate(order_by: {album_self_id: asc}, limit: 1) {
|
||||
nodes {
|
||||
@ -144,7 +144,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_Artist:
|
||||
hasura_Artist:
|
||||
- artist_self_id: '1000'
|
||||
albums_aggregate:
|
||||
nodes:
|
||||
@ -172,7 +172,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_Artist(order_by: {artist_self_id: asc}) {
|
||||
hasura_Artist(order_by: {artist_self_id: asc}) {
|
||||
artist_self_id
|
||||
albums_aggregate(order_by: {album_self_id: asc}, offset: 1) {
|
||||
nodes {
|
||||
|
@ -5,11 +5,11 @@
|
||||
X-Hasura-Role: published_only
|
||||
response:
|
||||
data:
|
||||
hasura_test_article: []
|
||||
hasura_article: []
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article (
|
||||
hasura_article (
|
||||
where: { is_published: {_eq: false}}
|
||||
) {
|
||||
id
|
||||
@ -24,14 +24,14 @@
|
||||
X-Hasura-Role: published_only
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '2'
|
||||
title: Title 2
|
||||
is_published: true
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article {
|
||||
hasura_article {
|
||||
id
|
||||
title
|
||||
is_published
|
||||
|
@ -4,7 +4,7 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
sql: |
|
||||
CREATE TABLE `hasura_test.all_types` (
|
||||
CREATE TABLE `hasura.all_types` (
|
||||
`string` STRING,
|
||||
`bytes` BYTES,
|
||||
`integer` INT64,
|
||||
@ -19,12 +19,12 @@ args:
|
||||
`datetime` DATETIME,
|
||||
`geography` GEOGRAPHY
|
||||
);
|
||||
CREATE TABLE `hasura_test.author` (
|
||||
CREATE TABLE `hasura.author` (
|
||||
`id` INT64,
|
||||
`name` STRING,
|
||||
`created_at` TIMESTAMP
|
||||
);
|
||||
CREATE TABLE `hasura_test.article` (
|
||||
CREATE TABLE `hasura.article` (
|
||||
`id` INT64,
|
||||
`title` STRING,
|
||||
`content` STRING,
|
||||
@ -33,7 +33,7 @@ args:
|
||||
`published_on` DATETIME,
|
||||
`created_at` TIMESTAMP
|
||||
);
|
||||
INSERT INTO `hasura_test.all_types` VALUES (
|
||||
INSERT INTO `hasura.all_types` VALUES (
|
||||
"STRING",
|
||||
CODE_POINTS_TO_BYTES([0,1,2,3,4,5]),
|
||||
1,
|
||||
@ -49,41 +49,41 @@ args:
|
||||
PARSE_DATETIME('%Y-%m-%d %H:%M:%S', '1998-10-18 13:45:55'),
|
||||
ST_GEOGPOINT(1, 1)
|
||||
);
|
||||
INSERT INTO `hasura_test.author` VALUES (
|
||||
INSERT INTO `hasura.author` VALUES (
|
||||
1, "Author 1", PARSE_TIMESTAMP("%c", "Thu Dec 25 07:30:00 2008")
|
||||
);
|
||||
INSERT INTO `hasura_test.author` VALUES (
|
||||
INSERT INTO `hasura.author` VALUES (
|
||||
2, "Author 2", PARSE_TIMESTAMP("%c", "Thu Dec 25 07:30:00 2008")
|
||||
);
|
||||
INSERT INTO `hasura_test.article` VALUES (
|
||||
INSERT INTO `hasura.article` VALUES (
|
||||
1, "Title 1", "Content 1", 1, FALSE, NULL, PARSE_TIMESTAMP("%c", "Thu Dec 25 07:30:01 2008")
|
||||
);
|
||||
INSERT INTO `hasura_test.article` VALUES (
|
||||
INSERT INTO `hasura.article` VALUES (
|
||||
2, "Title 2", "Content 2", 1, TRUE, PARSE_DATETIME('%Y-%m-%d %H:%M:%S', '1998-10-18 13:45:55'), PARSE_TIMESTAMP("%c", "Thu Dec 25 07:30:02 2008")
|
||||
);
|
||||
INSERT INTO `hasura_test.article` VALUES (
|
||||
INSERT INTO `hasura.article` VALUES (
|
||||
3, "Title 3", "Content 3", 2, FALSE, NULL, PARSE_TIMESTAMP("%c", "Thu Dec 25 07:30:03 2008")
|
||||
);
|
||||
INSERT INTO `hasura_test.article` VALUES (
|
||||
INSERT INTO `hasura.article` VALUES (
|
||||
4, "Title 4", "Content 4", 2, FALSE, NULL, PARSE_TIMESTAMP("%c", "Thu Dec 26 07:31:04 2008")
|
||||
);
|
||||
|
||||
-- a copy for remote joins as we can't have the same table tracked in two sources
|
||||
CREATE TABLE `hasura_test.article2`
|
||||
AS SELECT * FROM `hasura_test.article`;
|
||||
CREATE TABLE `hasura.article2`
|
||||
AS SELECT * FROM `hasura.article`;
|
||||
|
||||
-- These are helpful for join/aggregate testing.
|
||||
|
||||
CREATE TABLE hasura_test.Artist (
|
||||
CREATE TABLE hasura.Artist (
|
||||
artist_self_id int64,
|
||||
name string);
|
||||
|
||||
CREATE TABLE hasura_test.Album (
|
||||
CREATE TABLE hasura.Album (
|
||||
album_self_id int64,
|
||||
artist_other_id int64,
|
||||
title string);
|
||||
|
||||
INSERT INTO hasura_test.Artist
|
||||
INSERT INTO hasura.Artist
|
||||
VALUES (1002,
|
||||
"tool" ),
|
||||
(1000,
|
||||
@ -91,7 +91,7 @@ args:
|
||||
(1001,
|
||||
"nirvana" );
|
||||
|
||||
INSERT INTO hasura_test.Album
|
||||
INSERT INTO hasura.Album
|
||||
(album_self_id,
|
||||
title,
|
||||
artist_other_id)
|
||||
@ -116,16 +116,16 @@ args:
|
||||
|
||||
-- These are for testing global limits.
|
||||
|
||||
CREATE TABLE hasura_test.LimitedArtist (
|
||||
CREATE TABLE hasura.LimitedArtist (
|
||||
artist_self_id int64,
|
||||
name string);
|
||||
|
||||
CREATE TABLE hasura_test.LimitedAlbum (
|
||||
CREATE TABLE hasura.LimitedAlbum (
|
||||
album_self_id int64,
|
||||
artist_other_id int64,
|
||||
title string);
|
||||
|
||||
INSERT INTO hasura_test.LimitedArtist
|
||||
INSERT INTO hasura.LimitedArtist
|
||||
VALUES (1002,
|
||||
"tool" ),
|
||||
(1000,
|
||||
@ -133,7 +133,7 @@ args:
|
||||
(1001,
|
||||
"nirvana" );
|
||||
|
||||
INSERT INTO hasura_test.LimitedAlbum
|
||||
INSERT INTO hasura.LimitedAlbum
|
||||
(album_self_id,
|
||||
title,
|
||||
artist_other_id)
|
||||
@ -155,19 +155,19 @@ args:
|
||||
( 2004,
|
||||
"fear innoculum",
|
||||
1002 );
|
||||
SELECT * from hasura_test.Album;
|
||||
SELECT * from hasura.Album;
|
||||
|
||||
CREATE TABLE `hasura_test.article_citation` (
|
||||
CREATE TABLE `hasura.article_citation` (
|
||||
`article_id` INT64,
|
||||
`cited_article_id` INT64,
|
||||
`description` STRING,
|
||||
);
|
||||
INSERT INTO hasura_test.article_citation
|
||||
INSERT INTO hasura.article_citation
|
||||
(article_id, cited_article_id, description)
|
||||
VALUES (1, 2, 'citing the 2nd'),
|
||||
(1, 3, 'citing the third as well'),
|
||||
(2, 3, 'the second also cites the third');
|
||||
|
||||
-- a copy for remote joins as we can't have the same table tracked in two sources
|
||||
CREATE TABLE `hasura_test.article_citation2`
|
||||
AS SELECT * FROM `hasura_test.article_citation`;
|
||||
CREATE TABLE `hasura.article_citation2`
|
||||
AS SELECT * FROM `hasura.article_citation`;
|
||||
|
@ -1,2 +1,17 @@
|
||||
type: bulk
|
||||
args: []
|
||||
args:
|
||||
- type: bigquery_run_sql
|
||||
args:
|
||||
source: bigquery
|
||||
cascade: true
|
||||
sql: |
|
||||
DROP TABLE IF EXISTS `hasura.all_types`;
|
||||
DROP TABLE IF EXISTS `hasura.author`;
|
||||
DROP TABLE IF EXISTS `hasura.article`;
|
||||
DROP TABLE IF EXISTS `hasura.article2`;
|
||||
DROP TABLE IF EXISTS `hasura.Artist`;
|
||||
DROP TABLE IF EXISTS `hasura.Album`;
|
||||
DROP TABLE IF EXISTS `hasura.LimitedArtist`;
|
||||
DROP TABLE IF EXISTS `hasura.LimitedAlbum`;
|
||||
DROP TABLE IF EXISTS `hasura.article_citation`;
|
||||
DROP TABLE IF EXISTS `hasura.article_citation2`;
|
||||
|
@ -4,7 +4,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author(order_by: {id: asc}) {
|
||||
hasura_author(order_by: {id: asc}) {
|
||||
id
|
||||
articles_aggregate(offset: 10) {
|
||||
aggregate {
|
||||
@ -25,7 +25,7 @@
|
||||
}
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
articles_aggregate:
|
||||
aggregate:
|
||||
@ -55,7 +55,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article(offset: 10) {
|
||||
hasura_article(offset: 10) {
|
||||
id
|
||||
author {
|
||||
id
|
||||
@ -68,4 +68,4 @@
|
||||
}
|
||||
response:
|
||||
data:
|
||||
hasura_test_article: []
|
||||
hasura_article: []
|
||||
|
@ -3,7 +3,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_all_types:
|
||||
hasura_all_types:
|
||||
- string: STRING
|
||||
bytes: AAECAwQF
|
||||
integer: '1'
|
||||
@ -23,7 +23,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_all_types {
|
||||
hasura_all_types {
|
||||
string
|
||||
bytes
|
||||
integer
|
||||
@ -45,7 +45,7 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_all_types_aggregate:
|
||||
hasura_all_types_aggregate:
|
||||
aggregate:
|
||||
max:
|
||||
string: STRING
|
||||
@ -74,7 +74,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_all_types_aggregate {
|
||||
hasura_all_types_aggregate {
|
||||
aggregate {
|
||||
max {
|
||||
string
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
- id: '2'
|
||||
@ -13,12 +13,12 @@ query:
|
||||
operationName: chooseThisOne
|
||||
query: |
|
||||
query ignoreThisOne {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
name
|
||||
}
|
||||
}
|
||||
query chooseThisOne {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}, where: {id: {_eq: 1}}){
|
||||
hasura_author (order_by: {id: asc}, where: {id: {_eq: 1}}){
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ response:
|
||||
errors:
|
||||
- extensions:
|
||||
code: validation-failed
|
||||
path: $.selectionSet.hasura_test_author.selectionSet.notPresentCol
|
||||
message: "field \"notPresentCol\" not found in type: 'hasura_test_author'"
|
||||
path: $.selectionSet.hasura_author.selectionSet.notPresentCol
|
||||
message: "field \"notPresentCol\" not found in type: 'hasura_author'"
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
notPresentCol
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
created_at: '2008-12-25T07:30:00Z'
|
||||
@ -13,7 +13,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
name
|
||||
created_at
|
||||
|
@ -3,7 +3,7 @@
|
||||
query:
|
||||
query: |
|
||||
query author_with_include($includeId: Boolean!, $includeName: Boolean!) {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id @include(if: $includeId)
|
||||
name @include(if: $includeName)
|
||||
}
|
||||
@ -13,7 +13,7 @@
|
||||
includeName: false
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
- id: '2'
|
||||
- url: /v1/graphql
|
||||
@ -21,7 +21,7 @@
|
||||
query:
|
||||
query: |
|
||||
query author_with_include($includeId: Boolean!, $includeName: Boolean!) {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id @include(if: $includeId)
|
||||
name @include(if: $includeName)
|
||||
}
|
||||
@ -31,6 +31,6 @@
|
||||
includeName: true
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- name: Author 1
|
||||
- name: Author 2
|
||||
|
@ -3,7 +3,7 @@
|
||||
query:
|
||||
query: |
|
||||
query hasura_author_with_skip($skipId: Boolean!, $skipName: Boolean!) {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id @skip(if: $skipId)
|
||||
name @skip(if: $skipName)
|
||||
}
|
||||
@ -13,7 +13,7 @@
|
||||
skipName: false
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- name: Author 1
|
||||
- name: Author 2
|
||||
- url: /v1/graphql
|
||||
@ -21,7 +21,7 @@
|
||||
query:
|
||||
query: |
|
||||
query hasura_author_with_skip($skipId: Boolean!, $skipName: Boolean!) {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id @skip(if: $skipId)
|
||||
name @skip(if: $skipName)
|
||||
}
|
||||
@ -31,6 +31,6 @@
|
||||
skipName: true
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
- id: '2'
|
||||
|
@ -3,13 +3,13 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '2'
|
||||
name: Author 2
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}, where: {name: {_eq: "Author 2"}}) {
|
||||
hasura_author (order_by: {id: asc}, where: {name: {_eq: "Author 2"}}) {
|
||||
id
|
||||
name
|
||||
}
|
||||
@ -20,13 +20,13 @@
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '2'
|
||||
name: Author 2
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}, where: {id: {_nin: [1]}}) {
|
||||
hasura_author (order_by: {id: asc}, where: {id: {_nin: [1]}}) {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@ -3,25 +3,25 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
- data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
- id: '2'
|
||||
- id: '3'
|
||||
- id: '4'
|
||||
- data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
- id: '2'
|
||||
query:
|
||||
- query: |
|
||||
query {
|
||||
hasura_test_article (order_by: {id: asc}) {
|
||||
hasura_article (order_by: {id: asc}) {
|
||||
id
|
||||
}
|
||||
}
|
||||
- query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ response:
|
||||
code: validation-failed
|
||||
message: "field \"does_not_exist\" not found in type: 'query_root'"
|
||||
- data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
- id: '2'
|
||||
query:
|
||||
@ -20,7 +20,7 @@ query:
|
||||
}
|
||||
- query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ status: 200
|
||||
query:
|
||||
query: |
|
||||
query fragmentCycle {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
...authorFragment
|
||||
}
|
||||
}
|
||||
|
||||
fragment authorFragment on hasura_test_author {
|
||||
fragment authorFragment on hasura_author {
|
||||
id
|
||||
name
|
||||
articles (order_by: {id: asc}) {
|
||||
@ -16,7 +16,7 @@ query:
|
||||
}
|
||||
}
|
||||
|
||||
fragment articleFragment on hasura_test_article {
|
||||
fragment articleFragment on hasura_article {
|
||||
title
|
||||
author {
|
||||
...authorFragment
|
||||
@ -25,6 +25,6 @@ query:
|
||||
response:
|
||||
errors:
|
||||
- extensions:
|
||||
path: $.selectionSet.hasura_test_author.selectionSet.authorFragment.selectionSet.articles.selectionSet.articleFragment.selectionSet.author.selectionSet
|
||||
path: $.selectionSet.hasura_author.selectionSet.authorFragment.selectionSet.articles.selectionSet.articleFragment.selectionSet.author.selectionSet
|
||||
code: validation-failed
|
||||
message: the fragment definition(s) authorFragment and articleFragment form a cycle
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '2'
|
||||
name: Author 2
|
||||
query:
|
||||
@ -11,7 +11,7 @@ query:
|
||||
authorId: 2
|
||||
query: |
|
||||
fragment MyFragment on query_root {
|
||||
hasura_test_author (order_by: {id: asc}, where: {id: {_eq: $authorId}}){
|
||||
hasura_author (order_by: {id: asc}, where: {id: {_eq: $authorId}}){
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_author: []
|
||||
hasura_author: []
|
||||
# # Other backends will respond with the following
|
||||
# errors:
|
||||
# - extensions:
|
||||
@ -14,7 +14,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_author (order_by: {id: asc}, where: {name: {_eq: "John\\"}}) {
|
||||
hasura_author (order_by: {id: asc}, where: {name: {_eq: "John\\"}}) {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@ -3,28 +3,28 @@ status: 200
|
||||
query:
|
||||
query: |
|
||||
query myQuery {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
...authorFragment
|
||||
... on hasura_test_author {
|
||||
... on hasura_author {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment authorFragment on hasura_test_author {
|
||||
fragment authorFragment on hasura_author {
|
||||
id
|
||||
articles (order_by: {id: asc}) {
|
||||
...articleFragment
|
||||
}
|
||||
}
|
||||
|
||||
fragment articleFragment on hasura_test_article {
|
||||
fragment articleFragment on hasura_article {
|
||||
title
|
||||
id
|
||||
}
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- id: '1'
|
||||
name: Author 1
|
||||
articles:
|
||||
|
@ -3,27 +3,27 @@ status: 200
|
||||
query:
|
||||
query: |
|
||||
query topLevelFragmentQuery {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
name
|
||||
}
|
||||
...topLevelAuthorFieldFragment
|
||||
hasura_test_article (order_by: {id: asc}) {
|
||||
hasura_article (order_by: {id: asc}) {
|
||||
title
|
||||
}
|
||||
...topLevelTitleFieldFragment
|
||||
}
|
||||
|
||||
fragment topLevelAuthorFieldFragment on query_root {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
fragment topLevelTitleFieldFragment on query_root {
|
||||
hasura_test_author (order_by: {id: asc}) {
|
||||
hasura_author (order_by: {id: asc}) {
|
||||
name
|
||||
}
|
||||
hasura_test_article (order_by: {id: asc}) {
|
||||
hasura_article (order_by: {id: asc}) {
|
||||
author {
|
||||
name
|
||||
}
|
||||
@ -31,12 +31,12 @@ query:
|
||||
}
|
||||
response:
|
||||
data:
|
||||
hasura_test_author:
|
||||
hasura_author:
|
||||
- name: Author 1
|
||||
id: '1'
|
||||
- name: Author 2
|
||||
id: '2'
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- title: Title 1
|
||||
author:
|
||||
name: Author 1
|
||||
|
@ -8,7 +8,7 @@
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
configuration:
|
||||
custom_root_fields:
|
||||
|
@ -1,34 +1,34 @@
|
||||
type: bulk
|
||||
args:
|
||||
|
||||
# === hasura_test ===
|
||||
# === hasura ===
|
||||
|
||||
## track tables
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Album
|
||||
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Artist
|
||||
|
||||
- type: bigquery_create_array_relationship
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Artist
|
||||
name: albums
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Album
|
||||
column_mapping:
|
||||
artist_self_id: artist_other_id
|
||||
@ -38,13 +38,13 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Album
|
||||
name: artist
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: Artist
|
||||
column_mapping:
|
||||
artist_other_id: artist_self_id
|
||||
@ -54,27 +54,27 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: author
|
||||
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
|
||||
- type: bigquery_create_array_relationship
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: author
|
||||
name: articles
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
column_mapping:
|
||||
id: author_id
|
||||
@ -83,13 +83,13 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
name: author
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: author
|
||||
column_mapping:
|
||||
author_id: id
|
||||
@ -99,7 +99,7 @@ args:
|
||||
role: published_only
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
permission:
|
||||
columns:
|
||||
@ -114,7 +114,7 @@ args:
|
||||
role: exact_article_id
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
permission:
|
||||
columns:
|
||||
@ -129,7 +129,7 @@ args:
|
||||
role: empty_perms
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
permission:
|
||||
columns: []
|
||||
@ -140,7 +140,7 @@ args:
|
||||
role: user
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
permission:
|
||||
columns:
|
||||
@ -158,7 +158,7 @@ args:
|
||||
role: test_timestamp_perm
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
permission:
|
||||
columns:
|
||||
@ -173,14 +173,14 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: all_types
|
||||
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article_citation
|
||||
|
||||
# === hasura_global_limited ===
|
||||
@ -190,14 +190,14 @@ args:
|
||||
args:
|
||||
source: hasura_global_limited
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedAlbum
|
||||
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: hasura_global_limited
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedArtist
|
||||
|
||||
## create relationships
|
||||
@ -205,13 +205,13 @@ args:
|
||||
args:
|
||||
source: hasura_global_limited
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedAlbum
|
||||
name: artist
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedArtist
|
||||
column_mapping:
|
||||
artist_other_id: artist_self_id
|
||||
@ -220,13 +220,13 @@ args:
|
||||
args:
|
||||
source: hasura_global_limited
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedArtist
|
||||
name: albums
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: LimitedAlbum
|
||||
column_mapping:
|
||||
artist_self_id: artist_other_id
|
||||
@ -235,13 +235,13 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
name: article_citations
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article_citation
|
||||
column_mapping:
|
||||
id: article_id
|
||||
@ -250,23 +250,23 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article_citation
|
||||
name: cited_article
|
||||
using:
|
||||
manual_configuration:
|
||||
remote_table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
column_mapping:
|
||||
cited_article_id: id
|
||||
|
||||
# === hasura_test/bigquery2 ===
|
||||
# === hasura/bigquery2 ===
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery2
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article2
|
||||
|
||||
- type: bigquery_create_remote_relationship
|
||||
@ -275,7 +275,7 @@ args:
|
||||
source: bigquery2
|
||||
table:
|
||||
name: article2
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
definition:
|
||||
to_source:
|
||||
relationship_type: object
|
||||
@ -284,7 +284,7 @@ args:
|
||||
source: bigquery
|
||||
table:
|
||||
name: author
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
|
||||
- type: bigquery_create_remote_relationship
|
||||
args:
|
||||
@ -292,7 +292,7 @@ args:
|
||||
source: bigquery
|
||||
table:
|
||||
name: author
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
definition:
|
||||
to_source:
|
||||
relationship_type: array
|
||||
@ -301,20 +301,20 @@ args:
|
||||
source: bigquery2
|
||||
table:
|
||||
name: article2
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
|
||||
- type: bigquery_track_table
|
||||
args:
|
||||
source: bigquery2
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article_citation2
|
||||
|
||||
- type: bigquery_create_remote_relationship
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: article
|
||||
name: article_citations2
|
||||
definition:
|
||||
@ -325,4 +325,4 @@ args:
|
||||
source: bigquery2
|
||||
table:
|
||||
name: article_citation2
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
|
@ -10,7 +10,7 @@ args:
|
||||
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
|
||||
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
|
||||
datasets:
|
||||
- hasura_test
|
||||
- hasura
|
||||
global_select_limit: 1
|
||||
tables: []
|
||||
|
||||
@ -20,7 +20,7 @@ args:
|
||||
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
|
||||
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
|
||||
datasets:
|
||||
- hasura_test
|
||||
- hasura
|
||||
global_select_limit: 10
|
||||
tables: []
|
||||
|
||||
@ -30,6 +30,6 @@ args:
|
||||
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
|
||||
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
|
||||
datasets:
|
||||
- hasura_test
|
||||
- hasura
|
||||
global_select_limit: 10
|
||||
tables: []
|
||||
|
@ -5,14 +5,14 @@
|
||||
X-Hasura-Role: test_timestamp_perm
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '2'
|
||||
title: Title 2
|
||||
content: Content 2
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article {
|
||||
hasura_article {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -5,7 +5,7 @@
|
||||
X-Hasura-Role: user
|
||||
response:
|
||||
data:
|
||||
hasura_test_article:
|
||||
hasura_article:
|
||||
- id: '1'
|
||||
title: Title 1
|
||||
content: Content 1
|
||||
@ -21,7 +21,7 @@
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_article(order_by: {id: asc}) {
|
||||
hasura_article(order_by: {id: asc}) {
|
||||
id
|
||||
title
|
||||
content
|
||||
|
@ -4,13 +4,12 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
sql: |
|
||||
DROP TABLE IF EXISTS `hasura_test.city`;
|
||||
CREATE TABLE `hasura_test.city` (
|
||||
CREATE TABLE `hasura.city` (
|
||||
`name` STRING,
|
||||
`country` STRING
|
||||
);
|
||||
|
||||
INSERT INTO `hasura_test.city` (`name`, `country`)
|
||||
INSERT INTO `hasura.city` (`name`, `country`)
|
||||
VALUES
|
||||
('Durham', 'USA'),
|
||||
('New York', 'USA'),
|
||||
|
@ -0,0 +1,8 @@
|
||||
type: bulk
|
||||
args:
|
||||
- type: bigquery_run_sql
|
||||
args:
|
||||
source: bigquery
|
||||
cascade: true
|
||||
sql: |
|
||||
DROP TABLE IF EXISTS `hasura.city`;
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_city:
|
||||
hasura_city:
|
||||
- name: Durham
|
||||
country: USA
|
||||
- name: Framlingham
|
||||
@ -11,7 +11,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_city (
|
||||
hasura_city (
|
||||
where: {name: {_like: "%ham" }},
|
||||
order_by: {name: asc}
|
||||
) {
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_city:
|
||||
hasura_city:
|
||||
- name: New Orleans
|
||||
country: USA
|
||||
- name: New York
|
||||
@ -11,7 +11,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_city (
|
||||
hasura_city (
|
||||
where: {name: {_nlike: "%ham" }},
|
||||
order_by: {name: asc}
|
||||
) {
|
||||
|
@ -6,5 +6,5 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: city
|
||||
|
@ -5,6 +5,6 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: city
|
||||
cascade: true
|
||||
|
@ -4,8 +4,7 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
sql: |
|
||||
DROP TABLE IF EXISTS `hasura_test.spatial_types_geog`;
|
||||
CREATE TABLE `hasura_test.spatial_types_geog` (
|
||||
CREATE TABLE `hasura.spatial_types_geog` (
|
||||
`point` GEOGRAPHY,
|
||||
`linestring` GEOGRAPHY,
|
||||
`polygon` GEOGRAPHY,
|
||||
@ -14,7 +13,7 @@ args:
|
||||
`multipolygon` GEOGRAPHY,
|
||||
`geometrycollection` GEOGRAPHY
|
||||
);
|
||||
INSERT INTO `hasura_test.spatial_types_geog` (
|
||||
INSERT INTO `hasura.spatial_types_geog` (
|
||||
`point`,
|
||||
`linestring`,
|
||||
`polygon`,
|
||||
|
@ -0,0 +1,8 @@
|
||||
type: bulk
|
||||
args:
|
||||
- type: bigquery_run_sql
|
||||
args:
|
||||
source: bigquery
|
||||
cascade: true
|
||||
sql: |
|
||||
DROP TABLE IF EXISTS `hasura.spatial_types_geog`;
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- point: POINT(3 4)
|
||||
linestring: LINESTRING(1 1, 2 3, 4 8, -6 3)
|
||||
polygon: POLYGON((2 1, 1 2, 1 1, 2 1))
|
||||
@ -18,7 +18,7 @@ response:
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog {
|
||||
hasura_spatial_types_geog {
|
||||
point
|
||||
linestring
|
||||
polygon
|
||||
|
@ -3,13 +3,13 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- multipolygon:
|
||||
MULTIPOLYGON(((-120.533 46.566, -118.283 46.1, -122.3 47.45, -120.533 46.566)), ((-2 2, -2 -2, 2 -2, 2 2, -2 2)))
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
multipolygon: {
|
||||
_st_contains: "POINT(0.5 0)"
|
||||
|
@ -3,12 +3,12 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- multipoint: MULTIPOINT(2 3, 7 8)
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
multipoint: {
|
||||
_st_d_within: { distance: 1, from: "POLYGON ((0 0, 10 10, 10 10, 10 0, 0 0))"}
|
||||
|
@ -3,12 +3,12 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- multipoint: MULTIPOINT(2 3, 7 8)
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
multipoint: {
|
||||
_st_d_within: { distance: 1, from: "POLYGON ((0 0, 10 10, 10 10, 10 0, 0 0))"}
|
||||
|
@ -3,7 +3,7 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- geometrycollection:
|
||||
GEOMETRYCOLLECTION(LINESTRING(1 1, 3 5), POLYGON((-5 -1, -5 -5, -1 -5, -1 -1, -5 -1)))
|
||||
query:
|
||||
@ -12,7 +12,7 @@ query:
|
||||
# any point order (probably the problem is in handling GEOGRAPHY params)
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
geometrycollection: {
|
||||
_st_equals: "GEOMETRYCOLLECTION(LINESTRING(1 1, 3 5), POLYGON((-5 -1, -5 -5, -1 -5, -1 -1, -5 -1)))"
|
||||
|
@ -3,12 +3,12 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- polygon: POLYGON((2 1, 1 2, 1 1, 2 1))
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(where: { polygon: { _st_intersects: "LINESTRING(0 0, 2 2)" } }) {
|
||||
hasura_spatial_types_geog(where: { polygon: { _st_intersects: "LINESTRING(0 0, 2 2)" } }) {
|
||||
polygon
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- point: POINT(3 4)
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
point: {
|
||||
_st_touches: "POLYGON ((3 4, 2 5, 5 5, 5 2, 3 4))"
|
||||
|
@ -3,12 +3,12 @@ url: /v1/graphql
|
||||
status: 200
|
||||
response:
|
||||
data:
|
||||
hasura_test_spatial_types_geog:
|
||||
hasura_spatial_types_geog:
|
||||
- multipoint: MULTIPOINT(2 3, 7 8)
|
||||
query:
|
||||
query: |
|
||||
query {
|
||||
hasura_test_spatial_types_geog(
|
||||
hasura_spatial_types_geog(
|
||||
where: {
|
||||
multipoint: {
|
||||
_st_within: "POLYGON ((0 0, 10 10, 10 10, 10 0, 0 0))"
|
||||
|
@ -5,5 +5,5 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: spatial_types_geog
|
||||
|
@ -5,6 +5,6 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: spatial_types_geog
|
||||
cascade: true
|
||||
|
@ -15,6 +15,6 @@ query:
|
||||
service_account: {from_env: HASURA_BIGQUERY_SERVICE_ACCOUNT}
|
||||
project_id: {from_env: HASURA_BIGQUERY_PROJECT_ID}
|
||||
datasets:
|
||||
- hasura_test
|
||||
- hasura
|
||||
global_select_limit: 1
|
||||
tables: []
|
||||
|
@ -5,6 +5,6 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
sql: |
|
||||
CREATE TABLE `hasura_test.table_to_customize` (
|
||||
CREATE TABLE `hasura.table_to_customize` (
|
||||
`column_to_customize` STRING
|
||||
);
|
||||
|
@ -6,4 +6,4 @@ args:
|
||||
source: bigquery
|
||||
cascade: true
|
||||
sql: |
|
||||
drop table `hasura_test.table_to_customize`;
|
||||
drop table `hasura.table_to_customize`;
|
||||
|
@ -8,7 +8,7 @@
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: table_to_customize
|
||||
configuration:
|
||||
custom_name: customized_table
|
||||
|
@ -5,5 +5,5 @@ args:
|
||||
args:
|
||||
source: bigquery
|
||||
table:
|
||||
dataset: hasura_test
|
||||
dataset: hasura
|
||||
name: table_to_customize
|
||||
|
Loading…
Reference in New Issue
Block a user