graphql-engine/server/tests-py/queries/v1/set_table_configuration/alter_column.yaml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
978 B
YAML
Raw Normal View History

- 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
column_config:
id:
custom_name: AuthorId
name:
custom_name: AuthorName
- 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
}
}