File tree Expand file tree Collapse file tree 9 files changed +209
-149
lines changed Expand file tree Collapse file tree 9 files changed +209
-149
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,10 @@ Optional plugin:
4646The current release has been tested and is confirmed working with the following plugin versions:
4747
4848- WordPress version 6.1.1
49- - WooCommerce version 7.1.0
50- - WP GraphQL version 1.5.0
51- - WooGraphQL version 0.6.2
49+ - WooCommerce version 7.4.0
50+ - WP GraphQL version 1.13.8
51+ - WooGraphQL version 0.12.0
52+ - WPGraphQL CORS version 2.1
5253
53542 . Make sure WooCommerce has some products already or import some sample products
5455
Original file line number Diff line number Diff line change 1- mutation ($input : AddToCartInput ! ) {
1+ mutation ($input : AddToCartInput ! ) {
22 addToCart (input : $input ) {
33 cartItem {
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 }
2830 variation {
29- id
30- databaseId
31- name
32- description
33- type
34- onSale
35- price
36- regularPrice
37- salePrice
38- image {
31+ node {
3932 id
40- sourceUrl
41- altText
42- }
43- attributes {
44- nodes {
33+ databaseId
34+ name
35+ description
36+ type
37+ onSale
38+ price
39+ regularPrice
40+ salePrice
41+ image {
4542 id
46- attributeId
47- name
48- value
43+ sourceUrl
44+ altText
45+ }
46+ attributes {
47+ nodes {
48+ id
49+ attributeId
50+ name
51+ value
52+ }
4953 }
5054 }
5155 }
Original file line number Diff line number Diff line change 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 }
Original file line number Diff line number Diff line change 44 nodes {
55 key
66 product {
7- id
8- databaseId
9- name
10- description
11- type
12- onSale
13- slug
14- averageRating
15- reviewCount
16- image {
7+ node {
178 id
18- sourceUrl
19- srcSet
20- altText
21- title
22- }
23- galleryImages {
24- nodes {
9+ databaseId
10+ name
11+ description
12+ type
13+ onSale
14+ slug
15+ averageRating
16+ reviewCount
17+ image {
2518 id
2619 sourceUrl
2720 srcSet
2821 altText
2922 title
3023 }
24+ galleryImages {
25+ nodes {
26+ id
27+ sourceUrl
28+ srcSet
29+ altText
30+ title
31+ }
32+ }
3133 }
3234 }
3335 variation {
34- id
35- databaseId
36- name
37- description
38- type
39- onSale
40- price
41- regularPrice
42- salePrice
43- image {
36+ node {
4437 id
45- sourceUrl
46- srcSet
47- altText
48- title
49- }
50- attributes {
51- nodes {
38+ databaseId
39+ name
40+ description
41+ type
42+ onSale
43+ price
44+ regularPrice
45+ salePrice
46+ image {
5247 id
53- name
54- value
48+ sourceUrl
49+ srcSet
50+ altText
51+ title
52+ }
53+ attributes {
54+ nodes {
55+ id
56+ name
57+ value
58+ }
5559 }
5660 }
5761 }
6165 subtotalTax
6266 }
6367 }
64- appliedCoupons {
65- nodes {
66- id
67- databaseId
68- discountType
69- amount
70- dateExpiry
71- products {
72- nodes {
73- id
74- }
75- }
76- productCategories {
77- nodes {
78- id
79- }
80- }
81- }
82- }
68+
8369 subtotal
8470 subtotalTax
8571 shippingTax
Original file line number Diff line number Diff line change 11query ProductsFromCategory ($id : ID ! ) {
2- productCategory (id : $id ) {
2+ productCategory (id : $id , idType : ID ) {
33 id
44 name
55 products (first : 50 ) {
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ query Product($id: ID!) {
2525 salePrice
2626 regularPrice
2727 databaseId
28- paColors {
28+ allPaColors {
2929 nodes {
3030 name
3131 }
3232 }
33- paSizes {
33+ allPaSizes {
3434 nodes {
3535 name
3636 }
Original file line number Diff line number Diff line change 2424
2525 <div class =" item" >
2626 <span class =" block mt-2 font-extrabold" >Name: <br /></span >
27- <span class =" item-content" >{{ products.product.name }}</span >
27+ <span class =" item-content" >{{ products.product.node. name }}</span >
2828 </div >
2929 <div class =" item" >
3030 <span class =" block mt-2 font-extrabold" >Quantity: <br /> </span >
You can’t perform that action at this time.
0 commit comments