mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 13:31:43 +03:00
76 lines
1.3 KiB
YAML
76 lines
1.3 KiB
YAML
|
-
|
||
|
description: Insert mutation
|
||
|
name: insert_hge_tests_test_t2
|
||
|
query: |
|
||
|
mutation insert_test_t2($objects: [hge_tests_test_t2_insert_input!]! ) {
|
||
|
insert_hge_tests_test_t2(objects: $objects) {
|
||
|
returning {
|
||
|
c1
|
||
|
c2
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
variables: |
|
||
|
{
|
||
|
"objects": [
|
||
|
{
|
||
|
"c1": 1,
|
||
|
"c2": "test1"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
response: |
|
||
|
{
|
||
|
"insert_hge_tests_test_t2": {
|
||
|
"returning": [
|
||
|
{
|
||
|
"c1": 1,
|
||
|
"c2": "test1"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
-
|
||
|
description: Update mutation
|
||
|
name: update_hge_tests_test_t2
|
||
|
query: |
|
||
|
mutation update_test_t2 {
|
||
|
update_hge_tests_test_t2(
|
||
|
where: {c1: {_eq: 1}},
|
||
|
_set: {c2: "test11"}
|
||
|
) {
|
||
|
returning {
|
||
|
c1
|
||
|
c2
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
variables: null
|
||
|
response: |
|
||
|
{
|
||
|
"update_hge_tests_test_t2": {
|
||
|
"returning": [
|
||
|
{
|
||
|
"c1": 1,
|
||
|
"c2": "test11"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
-
|
||
|
description: Delete mutation
|
||
|
name: delete_hge_tests_test_t2
|
||
|
query: |
|
||
|
mutation delete_test_t2 {
|
||
|
delete_hge_tests_test_t2(where: {c1: {_eq: 1}}) {
|
||
|
affected_rows
|
||
|
}
|
||
|
}
|
||
|
variables: null
|
||
|
response: |
|
||
|
{
|
||
|
"delete_hge_tests_test_t2": {
|
||
|
"affected_rows": 1
|
||
|
}
|
||
|
}
|