mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +03:00
51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
- description: Add a computed field for author table
|
|
url: /v1/query
|
|
status: 200
|
|
query:
|
|
type: add_computed_field
|
|
args:
|
|
table: author
|
|
name: get_articles
|
|
definition:
|
|
function: fetch_articles
|
|
table_argument: author_row
|
|
response:
|
|
message: success
|
|
|
|
- description: Drop computed field of a non existed table
|
|
url: /v1/query
|
|
status: 400
|
|
query:
|
|
type: drop_computed_field
|
|
args:
|
|
table: random
|
|
name: get_articles
|
|
response:
|
|
path: "$.args.table"
|
|
error: table "random" does not exist
|
|
code: not-exists
|
|
|
|
- description: Drop a non existed computed field
|
|
url: /v1/query
|
|
status: 400
|
|
query:
|
|
type: drop_computed_field
|
|
args:
|
|
table: author
|
|
name: random
|
|
response:
|
|
path: "$.args.name"
|
|
error: computed field "random" does not exist
|
|
code: not-exists
|
|
|
|
- description: Drop a valid computed field
|
|
url: /v1/query
|
|
status: 200
|
|
query:
|
|
type: drop_computed_field
|
|
args:
|
|
table: author
|
|
name: get_articles
|
|
response:
|
|
message: success
|