2020-10-29 15:48:45 +03:00
|
|
|
- description: Set custom column names
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
message: success
|
|
|
|
query:
|
|
|
|
type: set_table_customization
|
|
|
|
args:
|
|
|
|
table: author
|
|
|
|
configuration:
|
|
|
|
custom_root_fields:
|
|
|
|
select: Authors
|
2022-03-09 09:34:47 +03:00
|
|
|
column_config:
|
|
|
|
id:
|
|
|
|
custom_name: AuthorId
|
|
|
|
name:
|
|
|
|
custom_name: AuthorName
|
2020-10-29 15:48:45 +03:00
|
|
|
|
|
|
|
- description: "Rename column 'id' and drop column 'name'"
|
|
|
|
url: /v1/query
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
result_type: CommandOk
|
|
|
|
result: null
|
|
|
|
query:
|
|
|
|
type: run_sql
|
|
|
|
args:
|
|
|
|
sql: |
|
|
|
|
ALTER TABLE author DROP COLUMN name;
|
|
|
|
ALTER TABLE author RENAME COLUMN id to author_id;
|
|
|
|
|
|
|
|
- description: Test if custom column names are updated
|
|
|
|
url: /v1/graphql
|
|
|
|
status: 200
|
|
|
|
response:
|
|
|
|
data:
|
|
|
|
Authors:
|
|
|
|
- AuthorId: 1
|
|
|
|
age: 23
|
|
|
|
- AuthorId: 2
|
|
|
|
age: null
|
|
|
|
query:
|
|
|
|
query: |
|
|
|
|
query {
|
|
|
|
Authors{
|
|
|
|
AuthorId
|
|
|
|
age
|
|
|
|
}
|
|
|
|
}
|