graphql-engine/server/testcases/create_table.json
2018-06-28 00:32:00 +05:30

84 lines
1.6 KiB
JSON

{
"description": "schema test",
"depends": [],
"items": [
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "create_table",
"body": {
"primary_key": [
"id"
],
"name": "author",
"columns": [
{
"type": "serial",
"name": "id"
},
{
"type": "varchar",
"name": "email"
},
{
"type": "varchar",
"name": "name"
},
{
"type": "integer",
"name": "auth_id"
}
]
}
}
},
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "create_table",
"body": {
"primary_key": [
"id"
],
"name": "article",
"columns": [{
"type": "serial",
"name": "id"
}]
}
}
},
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 400,
"method": "POST",
"user_id": "1",
"request": {
"kind": "create_table",
"body": {
"primary_key": [
"id"
],
"name": "article",
"columns": [{
"type": "serial",
"name": "id"
}]
}
}
}
]
}