mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
ad8df00c48
GitOrigin-RevId: 603d51d65dc4ff8a64c8d1abd19845bf6a316bde
80 lines
1.5 KiB
YAML
80 lines
1.5 KiB
YAML
- description: PG add source
|
|
url: /v1/metadata
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: pg_add_source
|
|
args:
|
|
name: pg1
|
|
configuration:
|
|
connection_info:
|
|
database_url:
|
|
from_env: HASURA_GRAPHQL_PG_SOURCE_URL_1
|
|
pool_settings:
|
|
max_connections: 50
|
|
idle_timeout: 180
|
|
retries: 1
|
|
|
|
- description: create table
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
result_type: CommandOk
|
|
result:
|
|
query:
|
|
type: run_sql
|
|
args:
|
|
source: pg1
|
|
sql: |
|
|
create table author_s1(
|
|
id serial primary key,
|
|
name text unique
|
|
);
|
|
INSERT INTO author_s1 (name)
|
|
VALUES ('Author 1'), ('Author 2');
|
|
|
|
- description: track table
|
|
url: /v1/metadata
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: pg_track_table
|
|
args:
|
|
table: author_s1
|
|
source: pg1
|
|
|
|
- description: untrack table
|
|
url: /v1/metadata
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: pg_untrack_table
|
|
args:
|
|
table: author_s1
|
|
source: pg1
|
|
|
|
- description: drop table
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
result_type: CommandOk
|
|
result:
|
|
query:
|
|
type: run_sql
|
|
args:
|
|
source: pg1
|
|
sql: |
|
|
drop table author_s1;
|
|
|
|
- description: PG Drop Source
|
|
url: /v1/metadata
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: pg_drop_source
|
|
args:
|
|
name: pg1 |