165 lines
1.7 KiB
Plaintext
165 lines
1.7 KiB
Plaintext
# http://localhost:8080/
|
|
|
|
variables {
|
|
"data": [
|
|
{
|
|
"name": "Protect Ya Neck",
|
|
"created_at": "now",
|
|
"updated_at": "now"
|
|
},
|
|
{
|
|
"name": "Enter the Wu-Tang",
|
|
"created_at": "now",
|
|
"updated_at": "now"
|
|
}
|
|
]
|
|
}
|
|
|
|
mutation {
|
|
products(insert: $data) {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"update": {
|
|
"name": "Wu-Tang",
|
|
"description": "No description needed"
|
|
},
|
|
"product_id": 1
|
|
}
|
|
|
|
mutation {
|
|
products(id: $product_id, update: $update) {
|
|
id
|
|
name
|
|
description
|
|
}
|
|
}
|
|
|
|
query {
|
|
users {
|
|
id
|
|
email
|
|
picture: avatar
|
|
products(limit: 2, where: {price: {gt: 10}}) {
|
|
id
|
|
name
|
|
description
|
|
}
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"data": [
|
|
{
|
|
"name": "Gumbo1",
|
|
"created_at": "now",
|
|
"updated_at": "now"
|
|
},
|
|
{
|
|
"name": "Gumbo2",
|
|
"created_at": "now",
|
|
"updated_at": "now"
|
|
}
|
|
]
|
|
}
|
|
|
|
mutation {
|
|
products(id: 199, delete: true) {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
|
|
query {
|
|
products {
|
|
id
|
|
name
|
|
user {
|
|
email
|
|
}
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"data": {
|
|
"product_id": 5
|
|
}
|
|
}
|
|
|
|
mutation {
|
|
products(id: $product_id, delete: true) {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
|
|
query {
|
|
products {
|
|
id
|
|
name
|
|
price
|
|
users {
|
|
email
|
|
}
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"data": {
|
|
"email": "gfk@myspace.com",
|
|
"full_name": "Ghostface Killah",
|
|
"created_at": "now",
|
|
"updated_at": "now"
|
|
}
|
|
}
|
|
|
|
mutation {
|
|
user(insert: $data) {
|
|
id
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"update": {
|
|
"name": "Helloo",
|
|
"description": "World \u003c\u003e"
|
|
},
|
|
"user": 123
|
|
}
|
|
|
|
mutation {
|
|
products(id: 5, update: $update) {
|
|
id
|
|
name
|
|
description
|
|
}
|
|
}
|
|
|
|
variables {
|
|
"data": {
|
|
"name": "WOOO",
|
|
"price": 50.5
|
|
}
|
|
}
|
|
|
|
mutation {
|
|
products(insert: $data) {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
|
|
query getProducts {
|
|
products {
|
|
id
|
|
name
|
|
price
|
|
description
|
|
}
|
|
}
|
|
|
|
|