-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery_examples.json
More file actions
26 lines (26 loc) · 1.37 KB
/
Copy pathquery_examples.json
File metadata and controls
26 lines (26 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[
{
"query": "mutation {\n register(\n firstName: \"Ivan\"\n lastName: \"Petrov\"\n email: \"ivan@mail.com\"\n password: \"123456\"\n phone: \"123456789\"\n address: \"Lenina 1\"\n city: \"Moscow\"\n state: \"Moscow\"\n country: \"Russia\"\n zip: \"123456\"\n ) {\n token\n user {\n id\n firstName\n email\n }\n }\n}\n"
},
{
"query": "query {\n users {\n id\n firstName\n lastName\n email\n }\n}\n"
},
{
"query": "mutation {\n createItem(\n name: \"Laptop\"\n description: \"Gaming laptop\"\n price: 1200\n stock: 10\n ) {\n id\n name\n price\n }\n}\n"
},
{
"query": "query {\n items {\n id\n name\n price\n stock\n }\n}\n"
},
{
"query": "mutation {\n updateItem(\n id: \"1\"\n price: 1300\n stock: 8\n ) {\n id\n name\n price\n stock\n }\n}\n"
},
{
"query": "mutation {\n deleteItem(id: \"1\")\n}\n"
},
{
"query": "mutation {\n createOrder(\n items: [\n {\n itemId: \"2\"\n quantity: 2\n }\n ]\n ) {\n id\n totalPrice\n status\n }\n}\n"
},
{
"query": "query {\n orders {\n id\n totalPrice\n status\n items {\n quantity\n item {\n id\n name\n price\n }\n }\n }\n}\n"
}
]