Fix return values for bulk mutations and delete

This commit is contained in:
Vikram Rangnekar
2019-10-03 10:24:11 -04:00
parent a8ad87115e
commit 50ba6732fe
5 changed files with 71 additions and 93 deletions

View File

@ -1,28 +1,46 @@
# http://localhost:8080/
query {
me {
variables {
"update": {
"name": "Wu-Tang",
"description": "No description needed"
},
"product_id": 1
}
mutation {
products(id: $product_id, update: $update) {
id
email
full_name
name
description
}
}
variables {
"update": {
"name": "Hellooooo",
"description": "World",
"data": {
"email": "gfk@myspace.com",
"full_name": "Ghostface Killah",
"created_at": "now",
"updated_at": "now"
},
"user": 123
}
}
mutation {
products(update: $update, where: {id: {eq: 134}}) {
user(insert: $data) {
id
}
}
variables {
"data": {
"product_id": 5
}
}
mutation {
products(id: $product_id, delete: true) {
id
name
description
}
}
@ -39,20 +57,33 @@ query {
}
}
variables {
"update": {
"name": "Hellooooo",
"description": "World"
},
"user": 123
"data": [
{
"name": "Protect Ya Neck",
"created_at": "now",
"updated_at": "now"
},
{
"name": "Enter the Wu-Tang",
"created_at": "now",
"updated_at": "now"
}
]
}
mutation {
products(update: $update, where: {id: {eq: 134}}) {
products(insert: $data) {
id
name
description
}
}
query {
me {
id
email
full_name
}
}
@ -70,5 +101,4 @@ mutation {
name
description
}
}
}