Skip to content

Commit 2ebc402

Browse files
committed
Update cart functionality
1 parent 6a8c488 commit 2ebc402

File tree

1 file changed

+59
-42
lines changed

1 file changed

+59
-42
lines changed

apollo/mutations/UPDATE_CART_MUTATION.gql

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,60 @@
1-
mutation($input: UpdateItemQuantitiesInput!) {
1+
mutation ($input: UpdateItemQuantitiesInput!) {
22
updateItemQuantities(input: $input) {
33
items {
44
key
55
product {
6-
id
7-
databaseId
8-
name
9-
description
10-
type
11-
onSale
12-
slug
13-
averageRating
14-
reviewCount
15-
image {
6+
node {
167
id
17-
sourceUrl
18-
altText
19-
}
20-
galleryImages {
21-
nodes {
8+
databaseId
9+
name
10+
description
11+
type
12+
onSale
13+
slug
14+
averageRating
15+
reviewCount
16+
image {
2217
id
2318
sourceUrl
2419
altText
2520
}
21+
galleryImages {
22+
nodes {
23+
id
24+
sourceUrl
25+
altText
26+
}
27+
}
2628
}
2729
}
30+
2831
variation {
29-
id
30-
databaseId
31-
name
32-
description
33-
type
34-
onSale
35-
price
36-
regularPrice
37-
salePrice
38-
image {
32+
node {
3933
id
40-
sourceUrl
41-
altText
42-
}
43-
attributes {
44-
nodes {
34+
databaseId
35+
name
36+
description
37+
type
38+
onSale
39+
price
40+
regularPrice
41+
salePrice
42+
image {
4543
id
46-
attributeId
47-
name
48-
value
44+
sourceUrl
45+
altText
46+
}
47+
attributes {
48+
nodes {
49+
id
50+
attributeId
51+
name
52+
value
53+
}
4954
}
5055
}
5156
}
57+
5258
quantity
5359
total
5460
subtotal
@@ -57,23 +63,34 @@ mutation($input: UpdateItemQuantitiesInput!) {
5763
removed {
5864
key
5965
product {
60-
id
61-
databaseId
66+
node {
67+
id
68+
databaseId
69+
}
6270
}
71+
6372
variation {
64-
id
65-
databaseId
73+
node {
74+
id
75+
databaseId
76+
}
6677
}
6778
}
79+
6880
updated {
6981
key
7082
product {
71-
id
72-
databaseId
83+
node {
84+
id
85+
databaseId
86+
}
7387
}
88+
7489
variation {
75-
id
76-
databaseId
90+
node {
91+
id
92+
databaseId
93+
}
7794
}
7895
}
7996
}

0 commit comments

Comments
 (0)