@@ -251,15 +251,19 @@ private function checkout( $input, $mutation = null ) {
251251 totalTax
252252 taxStatus
253253 product {
254- ... on SimpleProduct {
255- id
256- }
257- ... on VariableProduct {
258- id
259- }
254+ node {
255+ ... on SimpleProduct {
256+ id
257+ }
258+ ... on VariableProduct {
259+ id
260+ }
261+ }
260262 }
261263 variation {
262- id
264+ node {
265+ id
266+ }
263267 }
264268 }
265269 }
@@ -480,10 +484,12 @@ function( $item ) {
480484 'total ' => ! empty ( $ item ->get_total () ) ? $ item ->get_total () : null ,
481485 'totalTax ' => ! empty ( $ item ->get_total_tax () ) ? $ item ->get_total_tax () : null ,
482486 'taxStatus ' => strtoupper ( $ item ->get_tax_status () ),
483- 'product ' => array ( 'id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ),
487+ 'product ' => array ( 'node ' => array ( ' id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ) ),
484488 'variation ' => ! empty ( $ item ->get_variation_id () )
485489 ? array (
486- 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
490+ 'node ' => array (
491+ 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
492+ ),
487493 )
488494 : null ,
489495 );
@@ -676,10 +682,12 @@ function( $item ) {
676682 'total ' => ! empty ( $ item ->get_total () ) ? $ item ->get_total () : null ,
677683 'totalTax ' => ! empty ( $ item ->get_total_tax () ) ? $ item ->get_total_tax () : null ,
678684 'taxStatus ' => strtoupper ( $ item ->get_tax_status () ),
679- 'product ' => array ( 'id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ),
685+ 'product ' => array ( 'node ' => array ( ' id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ) ),
680686 'variation ' => ! empty ( $ item ->get_variation_id () )
681687 ? array (
682- 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
688+ 'node ' => array (
689+ 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
690+ ),
683691 )
684692 : null ,
685693 );
@@ -877,10 +885,12 @@ function( $item ) {
877885 'total ' => ! empty ( $ item ->get_total () ) ? $ item ->get_total () : null ,
878886 'totalTax ' => ! empty ( $ item ->get_total_tax () ) ? $ item ->get_total_tax () : null ,
879887 'taxStatus ' => strtoupper ( $ item ->get_tax_status () ),
880- 'product ' => array ( 'id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ),
888+ 'product ' => array ( 'node ' => array ( ' id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ) ),
881889 'variation ' => ! empty ( $ item ->get_variation_id () )
882890 ? array (
883- 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
891+ 'node ' => array (
892+ 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
893+ ),
884894 )
885895 : null ,
886896 );
@@ -1059,10 +1069,12 @@ function( $item ) {
10591069 'total ' => ! empty ( $ item ->get_total () ) ? $ item ->get_total () : null ,
10601070 'totalTax ' => ! empty ( $ item ->get_total_tax () ) ? $ item ->get_total_tax () : null ,
10611071 'taxStatus ' => strtoupper ( $ item ->get_tax_status () ),
1062- 'product ' => array ( 'id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ),
1072+ 'product ' => array ( 'node ' => array ( ' id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ) ),
10631073 'variation ' => ! empty ( $ item ->get_variation_id () )
10641074 ? array (
1065- 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
1075+ 'node ' => array (
1076+ 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
1077+ ),
10661078 )
10671079 : null ,
10681080 );
@@ -1217,15 +1229,17 @@ public function testCheckoutMutationWithStripe() {
12171229 totalTax
12181230 taxStatus
12191231 product {
1220- ... on SimpleProduct {
1221- id
1222- }
1223- ... on VariableProduct {
1224- id
1225- }
1232+ node {
1233+ ... on SimpleProduct {
1234+ id
1235+ }
1236+ ... on VariableProduct {
1237+ id
1238+ }
1239+ }
12261240 }
12271241 variation {
1228- id
1242+ node { id }
12291243 }
12301244 }
12311245 }
@@ -1288,10 +1302,12 @@ function( $item ) {
12881302 'total ' => ! empty ( $ item ->get_total () ) ? $ item ->get_total () : null ,
12891303 'totalTax ' => ! empty ( $ item ->get_total_tax () ) ? $ item ->get_total_tax () : null ,
12901304 'taxStatus ' => strtoupper ( $ item ->get_tax_status () ),
1291- 'product ' => array ( 'id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ),
1305+ 'product ' => array ( 'node ' => array ( ' id ' => $ this ->product ->to_relay_id ( $ item ->get_product_id () ) ) ),
12921306 'variation ' => ! empty ( $ item ->get_variation_id () )
12931307 ? array (
1294- 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
1308+ 'node ' => array (
1309+ 'id ' => $ this ->variation ->to_relay_id ( $ item ->get_variation_id () ),
1310+ ),
12951311 )
12961312 : null ,
12971313 );
0 commit comments