Skip to content

Commit 8252e82

Browse files
serhalppieh
andauthored
feat!(gatsby-source-shopify): upgrade from Shopify API version 2022-04 to 2024-04 (#39082)
* chore!(gatsby-source-shopify): upgrade to api version 2024-04 See breaking changes in: - https://shopify.dev/docs/api/release-notes/previous-versions/2022-07 - https://shopify.dev/docs/api/release-notes/previous-versions/2022-10 - https://shopify.dev/docs/api/release-notes/previous-versions/2023-01 - https://shopify.dev/docs/api/release-notes/previous-versions/2023-04 * test: fix fixture syntax and update snapshots * chore: handle Count type * fix: handle intentory level * test: update snapshots and mocks * test: update variants fixture * test: update inventory level mock * fix: minimize breaking changes by keeping Int type for count fields * fix: mark productBased as deprecated * address review comments * test: update snapshots --------- Co-authored-by: pieh <[email protected]>
1 parent cddc252 commit 8252e82

31 files changed

+2264
-219
lines changed

packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap

+96-24
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ Array [
147147
}
148148
}
149149
}
150-
mediaCount
150+
mediaCount {
151+
count
152+
precision
153+
}
151154
metafields {
152155
edges {
153156
node {
@@ -196,7 +199,10 @@ Array [
196199
productType
197200
publishedAt
198201
requiresSellingPlan
199-
sellingPlanGroupCount
202+
sellingPlanGroupsCount {
203+
count
204+
precision
205+
}
200206
seo {
201207
description
202208
title
@@ -276,7 +282,10 @@ Array [
276282
inventoryLevels {
277283
edges {
278284
node {
279-
available
285+
quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) {
286+
name
287+
quantity
288+
}
280289
id
281290
location {
282291
id
@@ -285,7 +294,10 @@ Array [
285294
}
286295
}
287296
legacyResourceId
288-
locationsCount
297+
locationsCount {
298+
count
299+
precision
300+
}
289301
provinceCodeOfOrigin
290302
requiresShipping
291303
sku
@@ -340,7 +352,10 @@ Array [
340352
name
341353
value
342354
}
343-
sellingPlanGroupCount
355+
sellingPlanGroupsCount {
356+
count
357+
precision
358+
}
344359
sku
345360
storefrontId
346361
taxCode
@@ -503,7 +518,10 @@ Array [
503518
}
504519
}
505520
}
506-
productsCount
521+
productsCount {
522+
count
523+
precision
524+
}
507525
ruleSet {
508526
appliedDisjunctively
509527
rules {
@@ -793,7 +811,10 @@ Array [
793811
}
794812
}
795813
}
796-
mediaCount
814+
mediaCount {
815+
count
816+
precision
817+
}
797818
metafields {
798819
edges {
799820
node {
@@ -842,7 +863,10 @@ Array [
842863
productType
843864
publishedAt
844865
requiresSellingPlan
845-
sellingPlanGroupCount
866+
sellingPlanGroupsCount {
867+
count
868+
precision
869+
}
846870
seo {
847871
description
848872
title
@@ -922,7 +946,10 @@ Array [
922946
inventoryLevels {
923947
edges {
924948
node {
925-
available
949+
quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) {
950+
name
951+
quantity
952+
}
926953
id
927954
location {
928955
id
@@ -931,7 +958,10 @@ Array [
931958
}
932959
}
933960
legacyResourceId
934-
locationsCount
961+
locationsCount {
962+
count
963+
precision
964+
}
935965
provinceCodeOfOrigin
936966
requiresShipping
937967
sku
@@ -986,7 +1016,10 @@ Array [
9861016
name
9871017
value
9881018
}
989-
sellingPlanGroupCount
1019+
sellingPlanGroupsCount {
1020+
count
1021+
precision
1022+
}
9901023
sku
9911024
storefrontId
9921025
taxCode
@@ -1149,7 +1182,10 @@ Array [
11491182
}
11501183
}
11511184
}
1152-
productsCount
1185+
productsCount {
1186+
count
1187+
precision
1188+
}
11531189
ruleSet {
11541190
appliedDisjunctively
11551191
rules {
@@ -1439,7 +1475,10 @@ Array [
14391475
}
14401476
}
14411477
}
1442-
mediaCount
1478+
mediaCount {
1479+
count
1480+
precision
1481+
}
14431482
metafields {
14441483
edges {
14451484
node {
@@ -1488,7 +1527,10 @@ Array [
14881527
productType
14891528
publishedAt
14901529
requiresSellingPlan
1491-
sellingPlanGroupCount
1530+
sellingPlanGroupsCount {
1531+
count
1532+
precision
1533+
}
14921534
seo {
14931535
description
14941536
title
@@ -1568,7 +1610,10 @@ Array [
15681610
inventoryLevels {
15691611
edges {
15701612
node {
1571-
available
1613+
quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) {
1614+
name
1615+
quantity
1616+
}
15721617
id
15731618
location {
15741619
id
@@ -1577,7 +1622,10 @@ Array [
15771622
}
15781623
}
15791624
legacyResourceId
1580-
locationsCount
1625+
locationsCount {
1626+
count
1627+
precision
1628+
}
15811629
provinceCodeOfOrigin
15821630
requiresShipping
15831631
sku
@@ -1632,7 +1680,10 @@ Array [
16321680
name
16331681
value
16341682
}
1635-
sellingPlanGroupCount
1683+
sellingPlanGroupsCount {
1684+
count
1685+
precision
1686+
}
16361687
sku
16371688
storefrontId
16381689
taxCode
@@ -1795,7 +1846,10 @@ Array [
17951846
}
17961847
}
17971848
}
1798-
productsCount
1849+
productsCount {
1850+
count
1851+
precision
1852+
}
17991853
ruleSet {
18001854
appliedDisjunctively
18011855
rules {
@@ -2085,7 +2139,10 @@ Array [
20852139
}
20862140
}
20872141
}
2088-
mediaCount
2142+
mediaCount {
2143+
count
2144+
precision
2145+
}
20892146
metafields {
20902147
edges {
20912148
node {
@@ -2134,7 +2191,10 @@ Array [
21342191
productType
21352192
publishedAt
21362193
requiresSellingPlan
2137-
sellingPlanGroupCount
2194+
sellingPlanGroupsCount {
2195+
count
2196+
precision
2197+
}
21382198
seo {
21392199
description
21402200
title
@@ -2214,7 +2274,10 @@ Array [
22142274
inventoryLevels {
22152275
edges {
22162276
node {
2217-
available
2277+
quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) {
2278+
name
2279+
quantity
2280+
}
22182281
id
22192282
location {
22202283
id
@@ -2223,7 +2286,10 @@ Array [
22232286
}
22242287
}
22252288
legacyResourceId
2226-
locationsCount
2289+
locationsCount {
2290+
count
2291+
precision
2292+
}
22272293
provinceCodeOfOrigin
22282294
requiresShipping
22292295
sku
@@ -2278,7 +2344,10 @@ Array [
22782344
name
22792345
value
22802346
}
2281-
sellingPlanGroupCount
2347+
sellingPlanGroupsCount {
2348+
count
2349+
precision
2350+
}
22822351
sku
22832352
storefrontId
22842353
taxCode
@@ -2441,7 +2510,10 @@ Array [
24412510
}
24422511
}
24432512
}
2444-
productsCount
2513+
productsCount {
2514+
count
2515+
precision
2516+
}
24452517
ruleSet {
24462518
appliedDisjunctively
24472519
rules {

0 commit comments

Comments
 (0)