-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGqltests.gql
79 lines (72 loc) · 1.39 KB
/
Gqltests.gql
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
query getAllProducts {
getAllProducts {
_id
name
description
}
}
query getProductById{
getProductById( _id: "kdf"){
_id
name
description
}
}
query getProductsByProducer{
getProductsByProducer(ProducerID:"1234"){
id
ProducerID
name
description
longDescription
}
}
mutation AddNewProduct {
createProduct(
offerTypes: [{ price: 1, amount: 2, tax: 3, discount: 4, unit: MILILITER }]
producerID: "2"
name: "Produkt50"
description: "description"
longDescription: "longDescription"
brand: "Bergish Pur"
category: FISH
allergen: [GLUTEN, FISH, MILK]
additive: [DYE, PHOSPHATE]
foodSafety: ALCOHOL
color: "Red"
packaging: PAPER
condition: DRIED
createdAt: "2019-09-08T10:29:07.817Z"
image: {name:"aveyro", resolutions:"ave"}
) {
name
description
category
longDescription
createdAt
brand
color
_id
offerTypes{price}
}
}
mutation deleteTest{
deleteProduct( name: "Produkt40")
{brand}
}
mutation Update {
updateProduct(
_id: "5d74d8bb2b6a1009e4a07b63"
input: {
name: "New Name1"
description: "neww Desc"
category: CEREAL_PRODUCTS
brand: "abcdef"
color: "Blau"
longDescription: "A very Long Description"
}
) {
_id
name
}
}