2018-09-20 04:46:03 +03:00
|
|
|
-
|
|
|
|
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"
|
2019-09-14 09:01:06 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"c1": 2,
|
|
|
|
"c2": "test2"
|
2018-09-20 04:46:03 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
response: |
|
|
|
|
{
|
|
|
|
"insert_hge_tests_test_t2": {
|
|
|
|
"returning": [
|
|
|
|
{
|
|
|
|
"c1": 1,
|
|
|
|
"c2": "test1"
|
2019-09-14 09:01:06 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"c1": 2,
|
|
|
|
"c2": "test2"
|
2018-09-20 04:46:03 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
-
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2019-09-14 09:01:06 +03:00
|
|
|
live_response: |
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"c1": 1,
|
|
|
|
"c2": "test11"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"c1": 2,
|
|
|
|
"c2": "test2"
|
|
|
|
}
|
|
|
|
]
|
2018-09-20 04:46:03 +03:00
|
|
|
-
|
|
|
|
description: Delete mutation
|
|
|
|
name: delete_hge_tests_test_t2
|
|
|
|
query: |
|
|
|
|
mutation delete_test_t2 {
|
2019-09-14 09:01:06 +03:00
|
|
|
delete_hge_tests_test_t2(where: {c1: {_in: [1, 2]}}) {
|
2018-09-20 04:46:03 +03:00
|
|
|
affected_rows
|
|
|
|
}
|
|
|
|
}
|
|
|
|
variables: null
|
|
|
|
response: |
|
|
|
|
{
|
|
|
|
"delete_hge_tests_test_t2": {
|
2019-09-14 09:01:06 +03:00
|
|
|
"affected_rows": 2
|
2018-09-20 04:46:03 +03:00
|
|
|
}
|
|
|
|
}
|