mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 13:02:11 +03:00
42 lines
883 B
JSON
42 lines
883 B
JSON
{
|
|
"description": "add existing view",
|
|
"depends": [],
|
|
"items": [
|
|
{
|
|
"name": "create_schema",
|
|
"url": "/api/1/query",
|
|
"role": "admin",
|
|
"status_code": 200,
|
|
"method": "POST",
|
|
"user_id": "1",
|
|
"pre_sql": [
|
|
"CREATE TABLE test(id serial)",
|
|
"CREATE VIEW test_view AS (SELECT id FROM test WHERE id > 10)"
|
|
],
|
|
"request": {
|
|
"kind": "add_existing_view",
|
|
"body": {
|
|
"view": "test_view"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "create_schema",
|
|
"url": "/api/1/query",
|
|
"role": "admin",
|
|
"status_code": 400,
|
|
"method": "POST",
|
|
"response": {
|
|
"path": "$",
|
|
"error": "view already tracked"
|
|
},
|
|
"user_id": "1",
|
|
"request": {
|
|
"kind": "add_existing_view",
|
|
"body": {
|
|
"view": "test_view"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |