diff --git a/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap b/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap index 55d27ce7df5be..f4aa1881bca84 100644 --- a/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap +++ b/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap @@ -147,7 +147,10 @@ Array [ } } } - mediaCount + mediaCount { + count + precision + } metafields { edges { node { @@ -196,7 +199,10 @@ Array [ productType publishedAt requiresSellingPlan - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } seo { description title @@ -276,7 +282,10 @@ Array [ inventoryLevels { edges { node { - available + quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) { + name + quantity + } id location { id @@ -285,7 +294,10 @@ Array [ } } legacyResourceId - locationsCount + locationsCount { + count + precision + } provinceCodeOfOrigin requiresShipping sku @@ -340,7 +352,10 @@ Array [ name value } - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } sku storefrontId taxCode @@ -503,7 +518,10 @@ Array [ } } } - productsCount + productsCount { + count + precision + } ruleSet { appliedDisjunctively rules { @@ -793,7 +811,10 @@ Array [ } } } - mediaCount + mediaCount { + count + precision + } metafields { edges { node { @@ -842,7 +863,10 @@ Array [ productType publishedAt requiresSellingPlan - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } seo { description title @@ -922,7 +946,10 @@ Array [ inventoryLevels { edges { node { - available + quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) { + name + quantity + } id location { id @@ -931,7 +958,10 @@ Array [ } } legacyResourceId - locationsCount + locationsCount { + count + precision + } provinceCodeOfOrigin requiresShipping sku @@ -986,7 +1016,10 @@ Array [ name value } - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } sku storefrontId taxCode @@ -1149,7 +1182,10 @@ Array [ } } } - productsCount + productsCount { + count + precision + } ruleSet { appliedDisjunctively rules { @@ -1439,7 +1475,10 @@ Array [ } } } - mediaCount + mediaCount { + count + precision + } metafields { edges { node { @@ -1488,7 +1527,10 @@ Array [ productType publishedAt requiresSellingPlan - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } seo { description title @@ -1568,7 +1610,10 @@ Array [ inventoryLevels { edges { node { - available + quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) { + name + quantity + } id location { id @@ -1577,7 +1622,10 @@ Array [ } } legacyResourceId - locationsCount + locationsCount { + count + precision + } provinceCodeOfOrigin requiresShipping sku @@ -1632,7 +1680,10 @@ Array [ name value } - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } sku storefrontId taxCode @@ -1795,7 +1846,10 @@ Array [ } } } - productsCount + productsCount { + count + precision + } ruleSet { appliedDisjunctively rules { @@ -2085,7 +2139,10 @@ Array [ } } } - mediaCount + mediaCount { + count + precision + } metafields { edges { node { @@ -2134,7 +2191,10 @@ Array [ productType publishedAt requiresSellingPlan - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } seo { description title @@ -2214,7 +2274,10 @@ Array [ inventoryLevels { edges { node { - available + quantities(names: [\\"incoming\\", \\"available\\", \\"committed\\", \\"reserved\\", \\"damaged\\", \\"safety_stock\\", \\"quality_control\\"]) { + name + quantity + } id location { id @@ -2223,7 +2286,10 @@ Array [ } } legacyResourceId - locationsCount + locationsCount { + count + precision + } provinceCodeOfOrigin requiresShipping sku @@ -2278,7 +2344,10 @@ Array [ name value } - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } sku storefrontId taxCode @@ -2441,7 +2510,10 @@ Array [ } } } - productsCount + productsCount { + count + precision + } ruleSet { appliedDisjunctively rules { diff --git a/packages/gatsby-source-shopify/__tests__/__snapshots__/create-schema-customization.ts.snap b/packages/gatsby-source-shopify/__tests__/__snapshots__/create-schema-customization.ts.snap index 883b214cf2479..d7404f67dbdcf 100644 --- a/packages/gatsby-source-shopify/__tests__/__snapshots__/create-schema-customization.ts.snap +++ b/packages/gatsby-source-shopify/__tests__/__snapshots__/create-schema-customization.ts.snap @@ -516,6 +516,16 @@ Array [ POUNDS OUNCES } + + enum __PREFIX__ShopifyCountPrecision { + EXACT + AT_LEAST + } + + type __PREFIX__ShopifyCount { + count: Int! + precision: __PREFIX__ShopifyCountPrecision! + } ", " type __PREFIX__ShopifyExternalVideo implements Node & __PREFIX__ShopifyMedia @dontInfer { @@ -713,7 +723,7 @@ Array [ isGiftCard: Boolean! legacyResourceId: String! media: [__PREFIX__ShopifyMedia!]! @link(from: \\"media___NODE\\", by: \\"id\\") - mediaCount: Int! + mediaCount: __PREFIX__ShopifyCount! metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") onlineStorePreviewUrl: String @@ -724,7 +734,7 @@ Array [ productType: String! publishedAt: Date @dateformat requiresSellingPlan: Boolean! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! seo: __PREFIX__ShopifySEO! shopifyId: String! status: __PREFIX__ShopifyProductStatus! @@ -785,7 +795,7 @@ Array [ product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! sku: String shopifyId: String! storefrontId: String! @@ -824,7 +834,7 @@ Array [ metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") products: [__PREFIX__ShopifyProduct!]! @link(from: \\"products___NODE\\", by: \\"id\\") - productsCount: Int! + productsCount: __PREFIX__ShopifyCount! ruleSet: __PREFIX__ShopifyCollectionRuleSet seo: __PREFIX__ShopifySEO! shopifyId: String! @@ -912,9 +922,9 @@ Array [ duplicateSkuCount: Int! harmonizedSystemCode: String inventoryHistoryUrl: String - inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(from: \\"inventoryLevels___NODE\\", by: \\"id\\") + inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(by: \\"id\\") @proxy(from: \\"inventoryLevels___NODE\\", fromNode: true) legacyResourceId: String! - locationsCount: Int! + locationsCount: __PREFIX__ShopifyCount! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -926,9 +936,21 @@ Array [ variant: __PREFIX__ShopifyProductVariantConnection! } + type __PREFIX__ShopifyInventoryQuantity { + name: String! + quantity: Int! + } + type __PREFIX__ShopifyInventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users - available: Int! + quantities: [__PREFIX__ShopifyInventoryQuantity!]! + available: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"available\\") + incoming: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"incoming\\") + committed: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"committed\\") + reserved: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"reserved\\") + damaged: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"damaged\\") + safety_stock: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"safety_stock\\") + quality_control: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"quality_control\\") id: ID! location: __PREFIX__ShopifyLocation! @link(from: \\"_location\\", by: \\"id\\") shopifyId: String! @@ -1526,6 +1548,16 @@ Array [ POUNDS OUNCES } + + enum __PREFIX__ShopifyCountPrecision { + EXACT + AT_LEAST + } + + type __PREFIX__ShopifyCount { + count: Int! + precision: __PREFIX__ShopifyCountPrecision! + } ", " type __PREFIX__ShopifyExternalVideo implements Node & __PREFIX__ShopifyMedia @dontInfer { @@ -1723,7 +1755,7 @@ Array [ isGiftCard: Boolean! legacyResourceId: String! media: [__PREFIX__ShopifyMedia!]! @link(from: \\"media___NODE\\", by: \\"id\\") - mediaCount: Int! + mediaCount: __PREFIX__ShopifyCount! metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") onlineStorePreviewUrl: String @@ -1734,7 +1766,7 @@ Array [ productType: String! publishedAt: Date @dateformat requiresSellingPlan: Boolean! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! seo: __PREFIX__ShopifySEO! shopifyId: String! status: __PREFIX__ShopifyProductStatus! @@ -1795,7 +1827,7 @@ Array [ product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! sku: String shopifyId: String! storefrontId: String! @@ -2348,6 +2380,16 @@ Array [ POUNDS OUNCES } + + enum __PREFIX__ShopifyCountPrecision { + EXACT + AT_LEAST + } + + type __PREFIX__ShopifyCount { + count: Int! + precision: __PREFIX__ShopifyCountPrecision! + } ", " type __PREFIX__ShopifyExternalVideo implements Node & __PREFIX__ShopifyMedia @dontInfer { @@ -2545,7 +2587,7 @@ Array [ isGiftCard: Boolean! legacyResourceId: String! media: [__PREFIX__ShopifyMedia!]! @link(from: \\"media___NODE\\", by: \\"id\\") - mediaCount: Int! + mediaCount: __PREFIX__ShopifyCount! metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") onlineStorePreviewUrl: String @@ -2556,7 +2598,7 @@ Array [ productType: String! publishedAt: Date @dateformat requiresSellingPlan: Boolean! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! seo: __PREFIX__ShopifySEO! shopifyId: String! status: __PREFIX__ShopifyProductStatus! @@ -2617,7 +2659,7 @@ Array [ product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! sku: String shopifyId: String! storefrontId: String! @@ -2656,7 +2698,7 @@ Array [ metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") products: [__PREFIX__ShopifyProduct!]! @link(from: \\"products___NODE\\", by: \\"id\\") - productsCount: Int! + productsCount: __PREFIX__ShopifyCount! ruleSet: __PREFIX__ShopifyCollectionRuleSet seo: __PREFIX__ShopifySEO! shopifyId: String! @@ -2744,9 +2786,9 @@ Array [ duplicateSkuCount: Int! harmonizedSystemCode: String inventoryHistoryUrl: String - inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(from: \\"inventoryLevels___NODE\\", by: \\"id\\") + inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(by: \\"id\\") @proxy(from: \\"inventoryLevels___NODE\\", fromNode: true) legacyResourceId: String! - locationsCount: Int! + locationsCount: __PREFIX__ShopifyCount! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -2758,9 +2800,21 @@ Array [ variant: __PREFIX__ShopifyProductVariantConnection! } + type __PREFIX__ShopifyInventoryQuantity { + name: String! + quantity: Int! + } + type __PREFIX__ShopifyInventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users - available: Int! + quantities: [__PREFIX__ShopifyInventoryQuantity!]! + available: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"available\\") + incoming: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"incoming\\") + committed: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"committed\\") + reserved: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"reserved\\") + damaged: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"damaged\\") + safety_stock: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"safety_stock\\") + quality_control: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"quality_control\\") id: ID! location: __PREFIX__ShopifyLocation! @link(from: \\"_location\\", by: \\"id\\") shopifyId: String! @@ -3353,6 +3407,16 @@ Array [ POUNDS OUNCES } + + enum __PREFIX__ShopifyCountPrecision { + EXACT + AT_LEAST + } + + type __PREFIX__ShopifyCount { + count: Int! + precision: __PREFIX__ShopifyCountPrecision! + } ", " type __PREFIX__ShopifyExternalVideo implements Node & __PREFIX__ShopifyMedia @dontInfer { @@ -3550,7 +3614,7 @@ Array [ isGiftCard: Boolean! legacyResourceId: String! media: [__PREFIX__ShopifyMedia!]! @link(from: \\"media___NODE\\", by: \\"id\\") - mediaCount: Int! + mediaCount: __PREFIX__ShopifyCount! metafield(namespace: String! key: String!): __PREFIX__ShopifyMetafield metafields: [__PREFIX__ShopifyMetafield!]! @link(from: \\"metafields___NODE\\", by: \\"id\\") onlineStorePreviewUrl: String @@ -3561,7 +3625,7 @@ Array [ productType: String! publishedAt: Date @dateformat requiresSellingPlan: Boolean! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! seo: __PREFIX__ShopifySEO! shopifyId: String! status: __PREFIX__ShopifyProductStatus! @@ -3622,7 +3686,7 @@ Array [ product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: __PREFIX__ShopifyCount! sku: String shopifyId: String! storefrontId: String! diff --git a/packages/gatsby-source-shopify/__tests__/__snapshots__/source-from-operation.ts.snap b/packages/gatsby-source-shopify/__tests__/__snapshots__/source-from-operation.ts.snap index 4f14b1f94081e..fa15496727af0 100644 --- a/packages/gatsby-source-shopify/__tests__/__snapshots__/source-from-operation.ts.snap +++ b/packages/gatsby-source-shopify/__tests__/__snapshots__/source-from-operation.ts.snap @@ -29,7 +29,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -67,7 +70,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -149,7 +155,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -187,7 +196,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -236,12 +248,15 @@ Array [ "id": "5e2d818c-9edd-5d9a-9b8b-a87b59518efc", "image": null, "internal": Object { - "contentDigest": "beb270066b5a208a02aba997c30883c2", + "contentDigest": "57b8b2dad5372eae55550ccf5d4920c9", "type": "ShopifyCollection", }, "legacyResourceId": "278407151822", "metafields___NODE": Array [], - "productsCount": 2, + "productsCount": Object { + "count": 2, + "precision": "EXACT", + }, "products___NODE": Array [], "ruleSet": Object { "appliedDisjunctively": false, @@ -297,7 +312,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -335,7 +353,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -417,7 +438,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -455,7 +479,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -504,12 +531,15 @@ Array [ "id": "5e2d818c-9edd-5d9a-9b8b-a87b59518efc", "image": null, "internal": Object { - "contentDigest": "beb270066b5a208a02aba997c30883c2", + "contentDigest": "57b8b2dad5372eae55550ccf5d4920c9", "type": "ShopifyCollection", }, "legacyResourceId": "278407151822", "metafields___NODE": Array [], - "productsCount": 2, + "productsCount": Object { + "count": 2, + "precision": "EXACT", + }, "products___NODE": Array [], "ruleSet": Object { "appliedDisjunctively": false, @@ -565,7 +595,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -603,7 +636,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -685,7 +721,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -723,7 +762,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -833,7 +875,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -871,7 +916,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -953,7 +1001,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -991,7 +1042,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1101,7 +1155,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -1139,7 +1196,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1221,7 +1281,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -1259,7 +1322,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1360,7 +1426,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -1398,7 +1467,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1480,7 +1552,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -1518,7 +1593,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1619,7 +1697,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -1657,7 +1738,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1739,7 +1823,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -1777,7 +1864,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -1853,12 +1943,15 @@ Array [ "hasOutOfStockVariants": true, "id": "1386d0f3-354b-584c-a6bb-d11936c8f6fb", "internal": Object { - "contentDigest": "a41f9430e873b83c81f6e5b6d9bd10e6", + "contentDigest": "551a7887f6e65502ba6b8895bac273e8", "type": "ShopifyProduct", }, "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "media___NODE": Array [], "metafields___NODE": Array [ "e3bdda06-d619-5445-8b4a-d1155678928c", @@ -1900,7 +1993,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2011,12 +2107,15 @@ Array [ "hasOutOfStockVariants": false, "id": "87b524a6-a707-5eb9-b193-059b3fcf96e5", "internal": Object { - "contentDigest": "87b12a51632f4ce873d5342bbf8232b2", + "contentDigest": "5ff2f61556bdaacc8cd5baa0ed5bfd8f", "type": "ShopifyProduct", }, "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "media___NODE": Array [ "8fc15b46-8400-5778-b85c-05db5c009326", ], @@ -2060,7 +2159,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2113,7 +2215,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -2151,7 +2256,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2233,7 +2341,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -2271,7 +2382,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2347,12 +2461,15 @@ Array [ "hasOutOfStockVariants": true, "id": "1386d0f3-354b-584c-a6bb-d11936c8f6fb", "internal": Object { - "contentDigest": "a41f9430e873b83c81f6e5b6d9bd10e6", + "contentDigest": "551a7887f6e65502ba6b8895bac273e8", "type": "ShopifyProduct", }, "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "media___NODE": Array [], "metafields___NODE": Array [ "e3bdda06-d619-5445-8b4a-d1155678928c", @@ -2394,7 +2511,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2505,12 +2625,15 @@ Array [ "hasOutOfStockVariants": false, "id": "87b524a6-a707-5eb9-b193-059b3fcf96e5", "internal": Object { - "contentDigest": "87b12a51632f4ce873d5342bbf8232b2", + "contentDigest": "5ff2f61556bdaacc8cd5baa0ed5bfd8f", "type": "ShopifyProduct", }, "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "media___NODE": Array [ "8fc15b46-8400-5778-b85c-05db5c009326", ], @@ -2554,7 +2677,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2607,7 +2733,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -2645,7 +2774,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2727,7 +2859,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -2765,7 +2900,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -2806,15 +2944,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157308622", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "cedae3ee-f225-5c34-9dd8-f1a25f8d810c", "internal": Object { - "contentDigest": "452845f46b6d785b2a2b79f1c19cf91b", + "contentDigest": "66722f007ac1579519fbb7a397fddaed", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443326158", }, ], @@ -2829,18 +2996,24 @@ Array [ "id": "cba433a6-1513-576f-97c0-80b36fb8afa6", "image": null, "internal": Object { - "contentDigest": "6153d74ac94feac2cf2a9e198017ae0e", + "contentDigest": "9931abd3f939451b136f77e7c573bc26", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "cba433a6-1513-576f-97c0-80b36fb8afa6", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157308622/inventory_history", "legacyResourceId": "43101443326158", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443326158", @@ -2876,7 +3049,10 @@ Array [ "value": "Large", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157308622", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==", @@ -2892,15 +3068,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157275854", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "8970ecd9-9a83-5e55-915b-682cfff58699", "internal": Object { - "contentDigest": "900b607c641a129fc9b314be805064ac", + "contentDigest": "3ee56ed994b624cb1de780d06a481f37", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443293390", }, ], @@ -2915,18 +3120,24 @@ Array [ "id": "a0191127-d288-510d-94e5-14f7a6404454", "image": null, "internal": Object { - "contentDigest": "88ceea90890315ebbd90fa608fe8fc87", + "contentDigest": "f241fc91a88ebf40d208b9e798bf3b71", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "a0191127-d288-510d-94e5-14f7a6404454", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157275854/inventory_history", "legacyResourceId": "43101443293390", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443293390", @@ -2962,7 +3173,10 @@ Array [ "value": "Medium", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157275854", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==", @@ -2978,15 +3192,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157243086", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "6eeb7894-1eb4-5556-a797-396fdf229a63", "internal": Object { - "contentDigest": "ecd7ff4a931ca7f110d9da8e085c69ed", + "contentDigest": "07f7fb2e63f13bb1a969f2e58d3612b3", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443260622", }, ], @@ -3001,18 +3244,24 @@ Array [ "id": "435874ba-a8b0-5b29-a96a-8691e694bf3a", "image": null, "internal": Object { - "contentDigest": "ac479013a12b548eb17f918738d4507b", + "contentDigest": "1b9814e33e275046588c2a2f7f54ebca", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "435874ba-a8b0-5b29-a96a-8691e694bf3a", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157243086/inventory_history", "legacyResourceId": "43101443260622", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443260622", @@ -3048,7 +3297,10 @@ Array [ "value": "Small", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157243086", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==", @@ -3064,15 +3316,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759655118", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "e8f4985b-ed74-5a19-836d-b5d310c277e5", "internal": Object { - "contentDigest": "9d3d2135ce505be5bb10cb49481048fa", + "contentDigest": "51397f4cd40bd4e008b002b73797c3b8", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044460238", }, ], @@ -3095,18 +3376,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "cb4f9b7f7aa04ed5f938999889d1a7be", + "contentDigest": "07222beb2c0e34a4602665d83d0b0c21", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "480d2d09-c1b1-5f7c-94a2-635e73e50ef4", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759655118/inventory_history", "legacyResourceId": "43100044460238", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044460238", @@ -3142,7 +3429,10 @@ Array [ "value": "Large", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759655118", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==", @@ -3158,15 +3448,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759622350", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "453dda5f-1323-5aa3-8e75-9a0dd08025c2", "internal": Object { - "contentDigest": "1d0ee94937b283d852538b020a63a1c7", + "contentDigest": "bd4f5897a47f9c8912acd6d3da46fcfb", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044427470", }, ], @@ -3189,18 +3508,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "9c925f92d1e4581f17799fc3101ccd5d", + "contentDigest": "b39113e46e31a3e2d5a02e7e605b5bd4", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "266c6a92-078a-519d-8c03-257b4ed15b84", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759622350/inventory_history", "legacyResourceId": "43100044427470", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044427470", @@ -3236,7 +3561,10 @@ Array [ "value": "Medium", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759622350", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==", @@ -3252,15 +3580,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759589582", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "2261ddf5-7c64-5934-a990-7dc64fe17040", "internal": Object { - "contentDigest": "662364c3f80cabf5fdad46fe50fe71eb", + "contentDigest": "23d2d35e04ff3fa2f5b43c1d3f2c0f28", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044394702", }, ], @@ -3283,18 +3640,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "d7275dcc7296046a96102da46bd7254a", + "contentDigest": "aa3a57189a31a6e77cabb7bc99f4c8f0", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "232cdd32-2de5-5bdd-a327-08d539ecd51e", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759589582/inventory_history", "legacyResourceId": "43100044394702", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044394702", @@ -3330,7 +3693,10 @@ Array [ "value": "Small", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759589582", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==", @@ -3374,7 +3740,10 @@ Array [ "id": "gid://shopify/Product/6950279086286", "isGiftCard": false, "legacyResourceId": "6950279086286", - "mediaCount": 1, + "mediaCount": Object { + "count": 1, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/test-product", "onlineStoreUrl": null, "options": Array [ @@ -3412,7 +3781,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T21:26:01Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -3494,7 +3866,10 @@ Array [ "id": "gid://shopify/Product/6966721052878", "isGiftCard": false, "legacyResourceId": "6966721052878", - "mediaCount": 0, + "mediaCount": Object { + "count": 0, + "precision": "EXACT", + }, "onlineStorePreviewUrl": "https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product", "onlineStoreUrl": null, "options": Array [ @@ -3532,7 +3907,10 @@ Array [ "productType": "Test Type", "publishedAt": "2022-03-14T22:38:58Z", "requiresSellingPlan": false, - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "seo": Object { "description": null, "title": null, @@ -3573,15 +3951,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157308622", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "cedae3ee-f225-5c34-9dd8-f1a25f8d810c", "internal": Object { - "contentDigest": "452845f46b6d785b2a2b79f1c19cf91b", + "contentDigest": "66722f007ac1579519fbb7a397fddaed", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443326158", }, ], @@ -3596,18 +4003,24 @@ Array [ "id": "cba433a6-1513-576f-97c0-80b36fb8afa6", "image": null, "internal": Object { - "contentDigest": "6153d74ac94feac2cf2a9e198017ae0e", + "contentDigest": "9931abd3f939451b136f77e7c573bc26", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "cba433a6-1513-576f-97c0-80b36fb8afa6", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157308622/inventory_history", "legacyResourceId": "43101443326158", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443326158", @@ -3643,7 +4056,10 @@ Array [ "value": "Large", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157308622", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==", @@ -3659,15 +4075,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157275854", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "8970ecd9-9a83-5e55-915b-682cfff58699", "internal": Object { - "contentDigest": "900b607c641a129fc9b314be805064ac", + "contentDigest": "3ee56ed994b624cb1de780d06a481f37", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443293390", }, ], @@ -3682,18 +4127,24 @@ Array [ "id": "a0191127-d288-510d-94e5-14f7a6404454", "image": null, "internal": Object { - "contentDigest": "88ceea90890315ebbd90fa608fe8fc87", + "contentDigest": "f241fc91a88ebf40d208b9e798bf3b71", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "a0191127-d288-510d-94e5-14f7a6404454", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157275854/inventory_history", "legacyResourceId": "43101443293390", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443293390", @@ -3729,7 +4180,10 @@ Array [ "value": "Medium", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157275854", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==", @@ -3745,15 +4199,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41009157243086", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 0, "id": "6eeb7894-1eb4-5556-a797-396fdf229a63", "internal": Object { - "contentDigest": "ecd7ff4a931ca7f110d9da8e085c69ed", + "contentDigest": "07f7fb2e63f13bb1a969f2e58d3612b3", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 0, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443260622", }, ], @@ -3768,18 +4251,24 @@ Array [ "id": "435874ba-a8b0-5b29-a96a-8691e694bf3a", "image": null, "internal": Object { - "contentDigest": "ac479013a12b548eb17f918738d4507b", + "contentDigest": "1b9814e33e275046588c2a2f7f54ebca", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "435874ba-a8b0-5b29-a96a-8691e694bf3a", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T22:38:58Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157243086/inventory_history", "legacyResourceId": "43101443260622", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43101443260622", @@ -3815,7 +4304,10 @@ Array [ "value": "Small", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41009157243086", "sku": null, "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==", @@ -3831,15 +4323,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759655118", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "e8f4985b-ed74-5a19-836d-b5d310c277e5", "internal": Object { - "contentDigest": "9d3d2135ce505be5bb10cb49481048fa", + "contentDigest": "51397f4cd40bd4e008b002b73797c3b8", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044460238", }, ], @@ -3862,18 +4383,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "cb4f9b7f7aa04ed5f938999889d1a7be", + "contentDigest": "07222beb2c0e34a4602665d83d0b0c21", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "480d2d09-c1b1-5f7c-94a2-635e73e50ef4", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759655118/inventory_history", "legacyResourceId": "43100044460238", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044460238", @@ -3909,7 +4436,10 @@ Array [ "value": "Large", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759655118", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==", @@ -3925,15 +4455,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759622350", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "453dda5f-1323-5aa3-8e75-9a0dd08025c2", "internal": Object { - "contentDigest": "1d0ee94937b283d852538b020a63a1c7", + "contentDigest": "bd4f5897a47f9c8912acd6d3da46fcfb", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044427470", }, ], @@ -3956,18 +4515,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "9c925f92d1e4581f17799fc3101ccd5d", + "contentDigest": "b39113e46e31a3e2d5a02e7e605b5bd4", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "266c6a92-078a-519d-8c03-257b4ed15b84", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759622350/inventory_history", "legacyResourceId": "43100044427470", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044427470", @@ -4003,7 +4568,10 @@ Array [ "value": "Medium", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759622350", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==", @@ -4019,15 +4587,44 @@ Array [ Object { "__parentId": "gid://shopify/ProductVariant/41007759589582", "_location": "e3e3dfac-3cbd-5cef-b3d6-3fd214f93ab8", - "available": 1, "id": "2261ddf5-7c64-5934-a990-7dc64fe17040", "internal": Object { - "contentDigest": "662364c3f80cabf5fdad46fe50fe71eb", + "contentDigest": "23d2d35e04ff3fa2f5b43c1d3f2c0f28", "type": "ShopifyInventoryLevel", }, "location": Object { "shopifyId": "gid://shopify/Location/57173475534", }, + "quantities": Array [ + Object { + "name": "incoming", + "quantity": 0, + }, + Object { + "name": "available", + "quantity": 1, + }, + Object { + "name": "committed", + "quantity": 0, + }, + Object { + "name": "reserved", + "quantity": 0, + }, + Object { + "name": "damaged", + "quantity": 0, + }, + Object { + "name": "safety_stock", + "quantity": 0, + }, + Object { + "name": "quality_control", + "quantity": 0, + }, + ], "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044394702", }, ], @@ -4050,18 +4647,24 @@ Array [ "width": 1920, }, "internal": Object { - "contentDigest": "d7275dcc7296046a96102da46bd7254a", + "contentDigest": "aa3a57189a31a6e77cabb7bc99f4c8f0", "type": "ShopifyProductVariant", }, "inventoryItem": Object { "_variant": "232cdd32-2de5-5bdd-a327-08d539ecd51e", "countryCodeOfOrigin": null, "createdAt": "2022-03-14T13:53:31Z", - "duplicateSkuCount": 0, + "duplicateSkuCount": Object { + "count": 0, + "precision": "EXACT", + }, "harmonizedSystemCode": null, "inventoryHistoryUrl": "https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759589582/inventory_history", "legacyResourceId": "43100044394702", - "locationsCount": 1, + "locationsCount": Object { + "count": 1, + "precision": "EXACT", + }, "provinceCodeOfOrigin": null, "requiresShipping": true, "shopifyId": "gid://shopify/InventoryItem/43100044394702", @@ -4097,7 +4700,10 @@ Array [ "value": "Small", }, ], - "sellingPlanGroupCount": 0, + "sellingPlanGroupsCount": Object { + "count": 0, + "precision": "EXACT", + }, "shopifyId": "gid://shopify/ProductVariant/41007759589582", "sku": "", "storefrontId": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==", diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/collections.jsonl b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/collections.jsonl index 6fee49b8f0d3d..5db19673932f1 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/collections.jsonl +++ b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/collections.jsonl @@ -1 +1 @@ -{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","id":"gid:\/\/shopify\/Collection\/278407151822","image":null,"legacyResourceId":"278407151822","productsCount":2,"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z"} +{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","id":"gid:\/\/shopify\/Collection\/278407151822","image":null,"legacyResourceId":"278407151822","productsCount":{"count": 2, "precision": "EXACT"},"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z"} diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/products.jsonl b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/products.jsonl index 10187cdb17ee0..5641bb647dbce 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/products.jsonl +++ b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/products.jsonl @@ -1,5 +1,5 @@ -{"createdAt":"2022-02-15T22:22:42Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"featuredMedia":{"id":"gid:\/\/shopify\/MediaImage\/22755647652046"},"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":false,"id":"gid:\/\/shopify\/Product\/6950279086286","isGiftCard":false,"legacyResourceId":"6950279086286","mediaCount":1,"onlineStorePreviewUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/products\/test-product","onlineStoreUrl":null,"options":[{"id":"gid:\/\/shopify\/ProductOption\/8894327619790","name":"Size","position":1,"values":["Small","Medium","Large"]}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T21:26:01Z","requiresSellingPlan":false,"sellingPlanGroupCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NTAyNzkwODYyODY=","tags":["test-tag"],"templateSuffix":"","title":"Test Product","totalInventory":3,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T21:26:01Z","vendor":"Gatsby"} +{"createdAt":"2022-02-15T22:22:42Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"featuredMedia":{"id":"gid:\/\/shopify\/MediaImage\/22755647652046"},"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":false,"id":"gid:\/\/shopify\/Product\/6950279086286","isGiftCard":false,"legacyResourceId":"6950279086286","mediaCount":{"count": 1, "precision": "EXACT"},"onlineStorePreviewUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/products\/test-product","onlineStoreUrl":null,"options":[{"id":"gid:\/\/shopify\/ProductOption\/8894327619790","name":"Size","position":1,"values":["Small","Medium","Large"]}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T21:26:01Z","requiresSellingPlan":false,"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NTAyNzkwODYyODY=","tags":["test-tag"],"templateSuffix":"","title":"Test Product","totalInventory":3,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T21:26:01Z","vendor":"Gatsby"} {"alt":"","mediaContentType":"IMAGE","mediaErrors":[],"preview":{"image":{"altText":"","height":1280,"id":"gid:\/\/shopify\/ImageSource\/22758479855822","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"status":"READY"},"status":"READY","createdAt":"2022-02-15T22:22:44Z","fileErrors":[],"fileStatus":"READY","id":"gid:\/\/shopify\/MediaImage\/22755647652046","image":{"altText":"","height":1280,"id":"gid:\/\/shopify\/ImageSource\/22758479855822","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"mimeType":"image\/png","__parentId":"gid:\/\/shopify\/Product\/6950279086286"} {"createdAt":"2022-03-14T14:03:25Z","description":null,"id":"gid:\/\/shopify\/Metafield\/21077562228942","key":"subtitle","legacyResourceId":"21077562228942","namespace":"descriptors","ownerType":"PRODUCT","type":"single_line_text_field","updatedAt":"2022-03-14T14:03:25Z","value":"Test Subtitle","valueType":"single_line_text_field","__parentId":"gid:\/\/shopify\/Product\/6950279086286"} -{"createdAt":"2022-03-14T22:38:58Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":null,"featuredMedia":null,"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"copy-of-test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":true,"id":"gid:\/\/shopify\/Product\/6966721052878","isGiftCard":false,"legacyResourceId":"6966721052878","mediaCount":0,"onlineStorePreviewUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/products\/copy-of-test-product","onlineStoreUrl":null,"options":[{"id":"gid:\/\/shopify\/ProductOption\/8914986795214","name":"Size","position":1,"values":["Small","Medium","Large"]}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T22:38:58Z","requiresSellingPlan":false,"sellingPlanGroupCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NjY3MjEwNTI4Nzg=","tags":["test-tag"],"templateSuffix":"","title":"Copy of Test Product","totalInventory":0,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T22:38:58Z","vendor":"Gatsby"} +{"createdAt":"2022-03-14T22:38:58Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":null,"featuredMedia":null,"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"copy-of-test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":true,"id":"gid:\/\/shopify\/Product\/6966721052878","isGiftCard":false,"legacyResourceId":"6966721052878","mediaCount":{"count": 0, "precision": "EXACT"},"onlineStorePreviewUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/products\/copy-of-test-product","onlineStoreUrl":null,"options":[{"id":"gid:\/\/shopify\/ProductOption\/8914986795214","name":"Size","position":1,"values":["Small","Medium","Large"]}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T22:38:58Z","requiresSellingPlan":false,"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NjY3MjEwNTI4Nzg=","tags":["test-tag"],"templateSuffix":"","title":"Copy of Test Product","totalInventory":0,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T22:38:58Z","vendor":"Gatsby"} {"createdAt":"2022-03-14T22:38:58Z","description":null,"id":"gid:\/\/shopify\/Metafield\/21078060335310","key":"subtitle","legacyResourceId":"21078060335310","namespace":"descriptors","ownerType":"PRODUCT","type":"single_line_text_field","updatedAt":"2022-03-14T22:38:58Z","value":"Test Subtitle","valueType":"single_line_text_field","__parentId":"gid:\/\/shopify\/Product\/6966721052878"} diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/variants.jsonl b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/variants.jsonl index a1f024d1b6a21..b9276e469b3f0 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/variants.jsonl +++ b/packages/gatsby-source-shopify/__tests__/fixtures/bulk-results/variants.jsonl @@ -1,12 +1,12 @@ -{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Small","id":"gid:\/\/shopify\/ProductVariant\/41007759589582","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044394702","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759589582\/inventory_history","legacyResourceId":"43100044394702","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759589582"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759589582","position":1,"price":"1.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":1,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044394702","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759589582"} -{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Medium","id":"gid:\/\/shopify\/ProductVariant\/41007759622350","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044427470","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759622350\/inventory_history","legacyResourceId":"43100044427470","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759622350"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759622350","position":2,"price":"2.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":1,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044427470","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759622350"} -{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Large","id":"gid:\/\/shopify\/ProductVariant\/41007759655118","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044460238","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759655118\/inventory_history","legacyResourceId":"43100044460238","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759655118"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759655118","position":3,"price":"3.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":1,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044460238","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759655118"} -{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Small","id":"gid:\/\/shopify\/ProductVariant\/41009157243086","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443260622","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157243086\/inventory_history","legacyResourceId":"43101443260622","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157243086"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157243086","position":1,"price":"1.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":0,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443260622","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157243086"} -{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Medium","id":"gid:\/\/shopify\/ProductVariant\/41009157275854","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443293390","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157275854\/inventory_history","legacyResourceId":"43101443293390","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157275854"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157275854","position":2,"price":"2.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":0,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443293390","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157275854"} -{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Large","id":"gid:\/\/shopify\/ProductVariant\/41009157308622","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443326158","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157308622\/inventory_history","legacyResourceId":"43101443326158","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157308622"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157308622","position":3,"price":"3.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} -{"available":0,"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443326158","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157308622"} +{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Small","id":"gid:\/\/shopify\/ProductVariant\/41007759589582","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044394702","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759589582\/inventory_history","legacyResourceId":"43100044394702","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759589582"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759589582","position":1,"price":"1.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":1},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044394702","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759589582"} +{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Medium","id":"gid:\/\/shopify\/ProductVariant\/41007759622350","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044427470","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759622350\/inventory_history","legacyResourceId":"43100044427470","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759622350"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759622350","position":2,"price":"2.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":1},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044427470","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759622350"} +{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Large","id":"gid:\/\/shopify\/ProductVariant\/41007759655118","image":{"altText":null,"height":1280,"id":"gid:\/\/shopify\/ProductImage\/30403196551374","originalSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https:\/\/cdn.shopify.com\/s\/files\/1\/0506\/3521\/0958\/products\/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43100044460238","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6950279086286\/variants\/41007759655118\/inventory_history","legacyResourceId":"43100044460238","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41007759655118"}},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759655118","position":3,"price":"3.00","product":{"id":"gid:\/\/shopify\/Product\/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T14:00:01Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":1},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43100044460238","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41007759655118"} +{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Small","id":"gid:\/\/shopify\/ProductVariant\/41009157243086","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443260622","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157243086\/inventory_history","legacyResourceId":"43101443260622","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157243086"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157243086","position":1,"price":"1.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":0},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443260622","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157243086"} +{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Medium","id":"gid:\/\/shopify\/ProductVariant\/41009157275854","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443293390","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157275854\/inventory_history","legacyResourceId":"43101443293390","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157275854"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157275854","position":2,"price":"2.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":0},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443293390","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157275854"} +{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Large","id":"gid:\/\/shopify\/ProductVariant\/41009157308622","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":{"count": 0, "precision": "EXACT"},"harmonizedSystemCode":null,"id":"gid:\/\/shopify\/InventoryItem\/43101443326158","inventoryHistoryUrl":"https:\/\/atomic-digital-studio-test.myshopify.com\/admin\/products\/6966721052878\/variants\/41009157308622\/inventory_history","legacyResourceId":"43101443326158","locationsCount":{"count": 1, "precision": "EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"id":"gid:\/\/shopify\/ProductVariant\/41009157308622"}},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157308622","position":3,"price":"3.00","product":{"id":"gid:\/\/shopify\/Product\/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupsCount":{"count": 0, "precision": "EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T22:38:58Z","weight":0.0,"weightUnit":"KILOGRAMS"} +{"quantities": [{"name":"incoming","quantity":0},{"name":"available","quantity":0},{"name":"committed","quantity":0},{"name":"reserved","quantity":0},{"name":"damaged","quantity":0},{"name":"safety_stock","quantity":0},{"name":"quality_control","quantity":0}],"id":"gid:\/\/shopify\/InventoryLevel\/91371143374?inventory_item_id=43101443326158","location":{"id":"gid:\/\/shopify\/Location\/57173475534"},"__parentId":"gid:\/\/shopify\/ProductVariant\/41009157308622"} diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/index.ts b/packages/gatsby-source-shopify/__tests__/fixtures/index.ts index 84c664b070316..695ef08b639b7 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/index.ts +++ b/packages/gatsby-source-shopify/__tests__/fixtures/index.ts @@ -9,6 +9,7 @@ import ids from "./ids.json" export function mockGatsbyApi(): NodePluginArgs { return { actions: { + createFieldExtension: jest.fn(), createTypes: jest.fn(), createNode: jest.fn(), touchNode: jest.fn(), diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyCollection.json b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyCollection.json index 65bd231dddafe..43399d0ea4cb0 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyCollection.json +++ b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyCollection.json @@ -1 +1 @@ -[{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","image":null,"legacyResourceId":"278407151822","productsCount":2,"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z","shopifyId":"gid://shopify/Collection/278407151822","products___NODE":["87b524a6-a707-5eb9-b193-059b3fcf96e5","1386d0f3-354b-584c-a6bb-d11936c8f6fb"],"metafields___NODE":[],"id":"5e2d818c-9edd-5d9a-9b8b-a87b59518efc","internal":{"type":"ShopifyCollection","contentDigest":"097e80a6bd493fd407351894b026070f","owner":"gatsby-source-shopify","counter":47},"children":[],"parent":null}] \ No newline at end of file +[{"description":"Test Collection Description","descriptionHtml":"Test Collection Description","feedback":{"details":[],"summary":"This collection couldn’t be published to Google"},"handle":"test-collection","image":null,"legacyResourceId":"278407151822","productsCount":{"count":2,"precision":"EXACT"},"ruleSet":{"appliedDisjunctively":false,"rules":[{"column":"IS_PRICE_REDUCED","condition":"","relation":"IS_NOT_SET"}]},"seo":{"description":null,"title":null},"sortOrder":"BEST_SELLING","storefrontId":"Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzI3ODQwNzE1MTgyMg==","templateSuffix":"","title":"Test Collection","updatedAt":"2022-03-14T22:39:00Z","shopifyId":"gid://shopify/Collection/278407151822","products___NODE":["87b524a6-a707-5eb9-b193-059b3fcf96e5","1386d0f3-354b-584c-a6bb-d11936c8f6fb"],"metafields___NODE":[],"id":"5e2d818c-9edd-5d9a-9b8b-a87b59518efc","internal":{"type":"ShopifyCollection","contentDigest":"097e80a6bd493fd407351894b026070f","owner":"gatsby-source-shopify","counter":47},"children":[],"parent":null}] diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyInventoryLevel.json b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyInventoryLevel.json index 175f316031d30..51fabbed526a5 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyInventoryLevel.json +++ b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyInventoryLevel.json @@ -1 +1,278 @@ -[{"available":1,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41007759589582","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044394702","id":"2261ddf5-7c64-5934-a990-7dc64fe17040","internal":{"type":"ShopifyInventoryLevel","contentDigest":"49766e299f7c1185b12100197cf22289","owner":"gatsby-source-shopify","counter":43},"children":[],"parent":null},{"available":1,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41007759622350","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044427470","id":"453dda5f-1323-5aa3-8e75-9a0dd08025c2","internal":{"type":"ShopifyInventoryLevel","contentDigest":"65646031ede60f67d5cfb68bd885a993","owner":"gatsby-source-shopify","counter":41},"children":[],"parent":null},{"available":0,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41009157243086","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443260622","id":"6eeb7894-1eb4-5556-a797-396fdf229a63","internal":{"type":"ShopifyInventoryLevel","contentDigest":"7330b3b265ff5cd9c919d17c8b1f2738","owner":"gatsby-source-shopify","counter":37},"children":[],"parent":null},{"available":0,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41009157275854","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443293390","id":"8970ecd9-9a83-5e55-915b-682cfff58699","internal":{"type":"ShopifyInventoryLevel","contentDigest":"53a8f523b8c13f83aa3fe5e691f4fb05","owner":"gatsby-source-shopify","counter":35},"children":[],"parent":null},{"available":0,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41009157308622","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443326158","id":"cedae3ee-f225-5c34-9dd8-f1a25f8d810c","internal":{"type":"ShopifyInventoryLevel","contentDigest":"1fff8771ebc89cb33b23f9707784164f","owner":"gatsby-source-shopify","counter":33},"children":[],"parent":null},{"available":1,"location":{"shopifyId":"gid://shopify/Location/57173475534"},"__parentId":"gid://shopify/ProductVariant/41007759655118","shopifyId":"gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044460238","id":"e8f4985b-ed74-5a19-836d-b5d310c277e5","internal":{"type":"ShopifyInventoryLevel","contentDigest":"1213164ee47eb1e013bc51a08f113f51","owner":"gatsby-source-shopify","counter":39},"children":[],"parent":null}] \ No newline at end of file +[ + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 1 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41007759589582", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044394702", + "id": "2261ddf5-7c64-5934-a990-7dc64fe17040", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "49766e299f7c1185b12100197cf22289", + "owner": "gatsby-source-shopify", + "counter": 43 + }, + "children": [], + "parent": null + }, + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 1 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41007759622350", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044427470", + "id": "453dda5f-1323-5aa3-8e75-9a0dd08025c2", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "65646031ede60f67d5cfb68bd885a993", + "owner": "gatsby-source-shopify", + "counter": 41 + }, + "children": [], + "parent": null + }, + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 0 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41009157243086", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443260622", + "id": "6eeb7894-1eb4-5556-a797-396fdf229a63", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "7330b3b265ff5cd9c919d17c8b1f2738", + "owner": "gatsby-source-shopify", + "counter": 37 + }, + "children": [], + "parent": null + }, + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 0 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41009157275854", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443293390", + "id": "8970ecd9-9a83-5e55-915b-682cfff58699", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "53a8f523b8c13f83aa3fe5e691f4fb05", + "owner": "gatsby-source-shopify", + "counter": 35 + }, + "children": [], + "parent": null + }, + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 0 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41009157308622", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43101443326158", + "id": "cedae3ee-f225-5c34-9dd8-f1a25f8d810c", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "1fff8771ebc89cb33b23f9707784164f", + "owner": "gatsby-source-shopify", + "counter": 33 + }, + "children": [], + "parent": null + }, + { + "quantities": [ + { + "name": "incoming", + "quantity": 0 + }, + { + "name": "available", + "quantity": 1 + }, + { + "name": "committed", + "quantity": 0 + }, + { + "name": "reserved", + "quantity": 0 + }, + { + "name": "damaged", + "quantity": 0 + }, + { + "name": "safety_stock", + "quantity": 0 + }, + { + "name": "quality_control", + "quantity": 0 + } + ], + "location": { + "shopifyId": "gid://shopify/Location/57173475534" + }, + "__parentId": "gid://shopify/ProductVariant/41007759655118", + "shopifyId": "gid://shopify/InventoryLevel/91371143374?inventory_item_id=43100044460238", + "id": "e8f4985b-ed74-5a19-836d-b5d310c277e5", + "internal": { + "type": "ShopifyInventoryLevel", + "contentDigest": "1213164ee47eb1e013bc51a08f113f51", + "owner": "gatsby-source-shopify", + "counter": 39 + }, + "children": [], + "parent": null + } +] diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProduct.json b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProduct.json index db3e897855a8e..c18c15fcdc6f5 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProduct.json +++ b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProduct.json @@ -1 +1 @@ -[{"createdAt":"2022-03-14T22:38:58Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":null,"featuredMedia":null,"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"copy-of-test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":true,"isGiftCard":false,"legacyResourceId":"6966721052878","mediaCount":0,"onlineStorePreviewUrl":"https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product","onlineStoreUrl":null,"options":[{"name":"Size","position":1,"values":["Small","Medium","Large"],"shopifyId":"gid://shopify/ProductOption/8914986795214"}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T22:38:58Z","requiresSellingPlan":false,"sellingPlanGroupCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NjY3MjEwNTI4Nzg=","tags":["test-tag"],"templateSuffix":"","title":"Copy of Test Product","totalInventory":0,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T22:38:58Z","vendor":"Gatsby","shopifyId":"gid://shopify/Product/6966721052878","media___NODE":[],"variants___NODE":["435874ba-a8b0-5b29-a96a-8691e694bf3a","a0191127-d288-510d-94e5-14f7a6404454","cba433a6-1513-576f-97c0-80b36fb8afa6"],"metafields___NODE":["e3bdda06-d619-5445-8b4a-d1155678928c"],"collections___NODE":["5e2d818c-9edd-5d9a-9b8b-a87b59518efc"],"id":"1386d0f3-354b-584c-a6bb-d11936c8f6fb","internal":{"type":"ShopifyProduct","contentDigest":"c768cf13de234c3723e300b640e15c46","owner":"gatsby-source-shopify","counter":29},"children":[],"parent":null},{"createdAt":"2022-02-15T22:22:42Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"featuredMedia":{"shopifyId":"gid://shopify/MediaImage/22755647652046"},"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":false,"isGiftCard":false,"legacyResourceId":"6950279086286","mediaCount":1,"onlineStorePreviewUrl":"https://atomic-digital-studio-test.myshopify.com/products/test-product","onlineStoreUrl":null,"options":[{"name":"Size","position":1,"values":["Small","Medium","Large"],"shopifyId":"gid://shopify/ProductOption/8894327619790"}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T21:26:01Z","requiresSellingPlan":false,"sellingPlanGroupCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NTAyNzkwODYyODY=","tags":["test-tag"],"templateSuffix":"","title":"Test Product","totalInventory":3,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T21:26:01Z","vendor":"Gatsby","shopifyId":"gid://shopify/Product/6950279086286","media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"variants___NODE":["232cdd32-2de5-5bdd-a327-08d539ecd51e","266c6a92-078a-519d-8c03-257b4ed15b84","480d2d09-c1b1-5f7c-94a2-635e73e50ef4"],"metafields___NODE":["0f64cc58-bb8b-5173-851a-34fd9a5137a3"],"collections___NODE":["5e2d818c-9edd-5d9a-9b8b-a87b59518efc"],"id":"87b524a6-a707-5eb9-b193-059b3fcf96e5","internal":{"type":"ShopifyProduct","contentDigest":"469984af6fa3e64850c1cccc32d072b7","owner":"gatsby-source-shopify","counter":32},"children":[],"parent":null}] \ No newline at end of file +[{"createdAt":"2022-03-14T22:38:58Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":null,"featuredMedia":null,"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"copy-of-test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":true,"isGiftCard":false,"legacyResourceId":"6966721052878","mediaCount":0,"onlineStorePreviewUrl":"https://atomic-digital-studio-test.myshopify.com/products/copy-of-test-product","onlineStoreUrl":null,"options":[{"name":"Size","position":1,"values":["Small","Medium","Large"],"shopifyId":"gid://shopify/ProductOption/8914986795214"}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T22:38:58Z","requiresSellingPlan":false,"sellingPlanGroupsCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NjY3MjEwNTI4Nzg=","tags":["test-tag"],"templateSuffix":"","title":"Copy of Test Product","totalInventory":0,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T22:38:58Z","vendor":"Gatsby","shopifyId":"gid://shopify/Product/6966721052878","media___NODE":[],"variants___NODE":["435874ba-a8b0-5b29-a96a-8691e694bf3a","a0191127-d288-510d-94e5-14f7a6404454","cba433a6-1513-576f-97c0-80b36fb8afa6"],"metafields___NODE":["e3bdda06-d619-5445-8b4a-d1155678928c"],"collections___NODE":["5e2d818c-9edd-5d9a-9b8b-a87b59518efc"],"id":"1386d0f3-354b-584c-a6bb-d11936c8f6fb","internal":{"type":"ShopifyProduct","contentDigest":"c768cf13de234c3723e300b640e15c46","owner":"gatsby-source-shopify","counter":29},"children":[],"parent":null},{"createdAt":"2022-02-15T22:22:42Z","description":"Test Description","descriptionHtml":"Test Description","featuredImage":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"featuredMedia":{"shopifyId":"gid://shopify/MediaImage/22755647652046"},"feedback":{"details":[],"summary":"This product couldn’t be published to Google"},"giftCardTemplateSuffix":"","handle":"test-product","hasOnlyDefaultVariant":false,"hasOutOfStockVariants":false,"isGiftCard":false,"legacyResourceId":"6950279086286","mediaCount":1,"onlineStorePreviewUrl":"https://atomic-digital-studio-test.myshopify.com/products/test-product","onlineStoreUrl":null,"options":[{"name":"Size","position":1,"values":["Small","Medium","Large"],"shopifyId":"gid://shopify/ProductOption/8894327619790"}],"priceRange":{"maxVariantPrice":{"amount":"300.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"100.0","currencyCode":"CAD"}},"priceRangeV2":{"maxVariantPrice":{"amount":"3.0","currencyCode":"CAD"},"minVariantPrice":{"amount":"1.0","currencyCode":"CAD"}},"productType":"Test Type","publishedAt":"2022-03-14T21:26:01Z","requiresSellingPlan":false,"sellingPlanGroupsCount":0,"seo":{"description":null,"title":null},"status":"ACTIVE","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzY5NTAyNzkwODYyODY=","tags":["test-tag"],"templateSuffix":"","title":"Test Product","totalInventory":3,"totalVariants":3,"tracksInventory":true,"updatedAt":"2022-03-14T21:26:01Z","vendor":"Gatsby","shopifyId":"gid://shopify/Product/6950279086286","media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"variants___NODE":["232cdd32-2de5-5bdd-a327-08d539ecd51e","266c6a92-078a-519d-8c03-257b4ed15b84","480d2d09-c1b1-5f7c-94a2-635e73e50ef4"],"metafields___NODE":["0f64cc58-bb8b-5173-851a-34fd9a5137a3"],"collections___NODE":["5e2d818c-9edd-5d9a-9b8b-a87b59518efc"],"id":"87b524a6-a707-5eb9-b193-059b3fcf96e5","internal":{"type":"ShopifyProduct","contentDigest":"469984af6fa3e64850c1cccc32d072b7","owner":"gatsby-source-shopify","counter":32},"children":[],"parent":null}] \ No newline at end of file diff --git a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProductVariant.json b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProductVariant.json index f1639287d3696..400a32c7add9e 100644 --- a/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProductVariant.json +++ b/packages/gatsby-source-shopify/__tests__/fixtures/shopify-nodes/ShopifyProductVariant.json @@ -1 +1 @@ -[{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Small","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759589582/inventory_history","legacyResourceId":"43100044394702","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759589582"},"shopifyId":"gid://shopify/InventoryItem/43100044394702"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759589582","position":1,"price":"1.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759589582","inventoryLevels___NODE":["2261ddf5-7c64-5934-a990-7dc64fe17040"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"1.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759589582"}],"id":"232cdd32-2de5-5bdd-a327-08d539ecd51e","internal":{"type":"ShopifyProductVariant","contentDigest":"d78ab3f729dd2153d7b164c6188879bf","owner":"gatsby-source-shopify","counter":44},"children":[],"parent":null},{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Medium","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759622350/inventory_history","legacyResourceId":"43100044427470","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759622350"},"shopifyId":"gid://shopify/InventoryItem/43100044427470"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759622350","position":2,"price":"2.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759622350","inventoryLevels___NODE":["453dda5f-1323-5aa3-8e75-9a0dd08025c2"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"2.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759622350"}],"id":"266c6a92-078a-519d-8c03-257b4ed15b84","internal":{"type":"ShopifyProductVariant","contentDigest":"339e3ac99e27b1bd00f7982162ae65c0","owner":"gatsby-source-shopify","counter":42},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Small","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157243086/inventory_history","legacyResourceId":"43101443260622","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157243086"},"shopifyId":"gid://shopify/InventoryItem/43101443260622"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157243086","position":1,"price":"1.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157243086","inventoryLevels___NODE":["6eeb7894-1eb4-5556-a797-396fdf229a63"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"1.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157243086"}],"id":"435874ba-a8b0-5b29-a96a-8691e694bf3a","internal":{"type":"ShopifyProductVariant","contentDigest":"816cec6b9e17e17c77e2c6a7e2607041","owner":"gatsby-source-shopify","counter":38},"children":[],"parent":null},{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Large","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759655118/inventory_history","legacyResourceId":"43100044460238","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759655118"},"shopifyId":"gid://shopify/InventoryItem/43100044460238"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759655118","position":3,"price":"3.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupCount":0,"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759655118","inventoryLevels___NODE":["e8f4985b-ed74-5a19-836d-b5d310c277e5"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"3.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759655118"}],"id":"480d2d09-c1b1-5f7c-94a2-635e73e50ef4","internal":{"type":"ShopifyProductVariant","contentDigest":"ab757138bf54f19c6d959f292a291db8","owner":"gatsby-source-shopify","counter":40},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Medium","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157275854/inventory_history","legacyResourceId":"43101443293390","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157275854"},"shopifyId":"gid://shopify/InventoryItem/43101443293390"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157275854","position":2,"price":"2.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157275854","inventoryLevels___NODE":["8970ecd9-9a83-5e55-915b-682cfff58699"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"2.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157275854"}],"id":"a0191127-d288-510d-94e5-14f7a6404454","internal":{"type":"ShopifyProductVariant","contentDigest":"2614ce60a45c9ba2ed54f63511e74419","owner":"gatsby-source-shopify","counter":36},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Large","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157308622/inventory_history","legacyResourceId":"43101443326158","locationsCount":1,"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157308622"},"shopifyId":"gid://shopify/InventoryItem/43101443326158"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157308622","position":3,"price":"3.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupCount":0,"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157308622","inventoryLevels___NODE":["cedae3ee-f225-5c34-9dd8-f1a25f8d810c"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"3.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157308622"}],"id":"cba433a6-1513-576f-97c0-80b36fb8afa6","internal":{"type":"ShopifyProductVariant","contentDigest":"2e466fdbf7ec8501841aaa5a85b48259","owner":"gatsby-source-shopify","counter":34},"children":[],"parent":null}] \ No newline at end of file +[{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Small","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759589582/inventory_history","legacyResourceId":"43100044394702","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759589582"},"shopifyId":"gid://shopify/InventoryItem/43100044394702"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759589582","position":1,"price":"1.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTU4OTU4Mg==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759589582","inventoryLevels___NODE":["2261ddf5-7c64-5934-a990-7dc64fe17040"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"1.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759589582"}],"id":"232cdd32-2de5-5bdd-a327-08d539ecd51e","internal":{"type":"ShopifyProductVariant","contentDigest":"d78ab3f729dd2153d7b164c6188879bf","owner":"gatsby-source-shopify","counter":44},"children":[],"parent":null},{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Medium","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759622350/inventory_history","legacyResourceId":"43100044427470","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759622350"},"shopifyId":"gid://shopify/InventoryItem/43100044427470"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759622350","position":2,"price":"2.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTYyMjM1MA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759622350","inventoryLevels___NODE":["453dda5f-1323-5aa3-8e75-9a0dd08025c2"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"2.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759622350"}],"id":"266c6a92-078a-519d-8c03-257b4ed15b84","internal":{"type":"ShopifyProductVariant","contentDigest":"339e3ac99e27b1bd00f7982162ae65c0","owner":"gatsby-source-shopify","counter":42},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Small","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157243086/inventory_history","legacyResourceId":"43101443260622","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157243086"},"shopifyId":"gid://shopify/InventoryItem/43101443260622"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157243086","position":1,"price":"1.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Small"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI0MzA4Ng==","taxCode":null,"taxable":true,"title":"Small","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157243086","inventoryLevels___NODE":["6eeb7894-1eb4-5556-a797-396fdf229a63"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"1.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157243086"}],"id":"435874ba-a8b0-5b29-a96a-8691e694bf3a","internal":{"type":"ShopifyProductVariant","contentDigest":"816cec6b9e17e17c77e2c6a7e2607041","owner":"gatsby-source-shopify","counter":38},"children":[],"parent":null},{"availableForSale":true,"barcode":"","compareAtPrice":null,"createdAt":"2022-03-14T13:53:31Z","displayName":"Test Product - Large","image":{"altText":null,"height":1280,"originalSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","src":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","transformedSrc":"https://cdn.shopify.com/s/files/1/0506/3521/0958/products/placeholder_aa389e41-a6d1-453e-ba2a-dae56c3993eb.png?v=1644963764","width":1920,"shopifyId":"gid://shopify/ProductImage/30403196551374"},"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T13:53:31Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6950279086286/variants/41007759655118/inventory_history","legacyResourceId":"43100044460238","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":"","tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T13:53:31Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41007759655118"},"shopifyId":"gid://shopify/InventoryItem/43100044460238"},"inventoryPolicy":"DENY","inventoryQuantity":1,"legacyResourceId":"41007759655118","position":3,"price":"3.00","product":{"shopifyId":"gid://shopify/Product/6950279086286"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":"","storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwNzc1OTY1NTExOA==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T14:00:01Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41007759655118","inventoryLevels___NODE":["e8f4985b-ed74-5a19-836d-b5d310c277e5"],"metafields___NODE":[],"media___NODE":["8fc15b46-8400-5778-b85c-05db5c009326"],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"3.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41007759655118"}],"id":"480d2d09-c1b1-5f7c-94a2-635e73e50ef4","internal":{"type":"ShopifyProductVariant","contentDigest":"ab757138bf54f19c6d959f292a291db8","owner":"gatsby-source-shopify","counter":40},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Medium","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157275854/inventory_history","legacyResourceId":"43101443293390","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157275854"},"shopifyId":"gid://shopify/InventoryItem/43101443293390"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157275854","position":2,"price":"2.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Medium"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzI3NTg1NA==","taxCode":null,"taxable":true,"title":"Medium","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157275854","inventoryLevels___NODE":["8970ecd9-9a83-5e55-915b-682cfff58699"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"2.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157275854"}],"id":"a0191127-d288-510d-94e5-14f7a6404454","internal":{"type":"ShopifyProductVariant","contentDigest":"2614ce60a45c9ba2ed54f63511e74419","owner":"gatsby-source-shopify","counter":36},"children":[],"parent":null},{"availableForSale":false,"barcode":null,"compareAtPrice":null,"createdAt":"2022-03-14T22:38:58Z","displayName":"Copy of Test Product - Large","image":null,"inventoryItem":{"countryCodeOfOrigin":null,"createdAt":"2022-03-14T22:38:58Z","duplicateSkuCount":0,"harmonizedSystemCode":null,"inventoryHistoryUrl":"https://atomic-digital-studio-test.myshopify.com/admin/products/6966721052878/variants/41009157308622/inventory_history","legacyResourceId":"43101443326158","locationsCount":{"count":1,"precision":"EXACT"},"provinceCodeOfOrigin":null,"requiresShipping":true,"sku":null,"tracked":true,"trackedEditable":{"locked":false,"reason":null},"unitCost":null,"updatedAt":"2022-03-14T22:38:58Z","variant":{"shopifyId":"gid://shopify/ProductVariant/41009157308622"},"shopifyId":"gid://shopify/InventoryItem/43101443326158"},"inventoryPolicy":"DENY","inventoryQuantity":0,"legacyResourceId":"41009157308622","position":3,"price":"3.00","product":{"shopifyId":"gid://shopify/Product/6966721052878"},"requiresShipping":true,"selectedOptions":[{"name":"Size","value":"Large"}],"sellingPlanGroupsCount":{"count":0,"precision":"EXACT"},"sku":null,"storefrontId":"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MTAwOTE1NzMwODYyMg==","taxCode":null,"taxable":true,"title":"Large","updatedAt":"2022-03-14T22:38:58Z","weight":0,"weightUnit":"KILOGRAMS","shopifyId":"gid://shopify/ProductVariant/41009157308622","inventoryLevels___NODE":["cedae3ee-f225-5c34-9dd8-f1a25f8d810c"],"metafields___NODE":[],"media___NODE":[],"presentmentPrices":[{"compareAtPrice":null,"price":{"amount":"3.0","currencyCode":"CAD"},"__typename":"ProductVariantPricePair","__parentId":"gid://shopify/ProductVariant/41009157308622"}],"id":"cba433a6-1513-576f-97c0-80b36fb8afa6","internal":{"type":"ShopifyProductVariant","contentDigest":"2e466fdbf7ec8501841aaa5a85b48259","owner":"gatsby-source-shopify","counter":34},"children":[],"parent":null}] diff --git a/packages/gatsby-source-shopify/src/create-schema-customization.ts b/packages/gatsby-source-shopify/src/create-schema-customization.ts index b92270d6ef2b6..0266df32287c4 100644 --- a/packages/gatsby-source-shopify/src/create-schema-customization.ts +++ b/packages/gatsby-source-shopify/src/create-schema-customization.ts @@ -49,6 +49,29 @@ export function createSchemaCustomization( } `) } + actions.createFieldExtension({ + name: `selectQuantityByName`, + args: { + name: `String!`, + }, + extend({ name }, fieldConfig) { + return { + async resolve(source, args, context, info): Promise { + const resolver = fieldConfig.resolve || context.defaultFieldResolver + const quantities = await resolver(source, args, context, info) + if (quantities && Array.isArray(quantities)) { + for (const quantity of quantities) { + if (quantity?.name === name) { + return quantity.quantity + } + } + } + + return 0 + }, + } + }, + }) actions.createTypes(typeDefs) } diff --git a/packages/gatsby-source-shopify/src/plugin-options-schema.ts b/packages/gatsby-source-shopify/src/plugin-options-schema.ts index 278c29022db3d..008f3aca51f41 100644 --- a/packages/gatsby-source-shopify/src/plugin-options-schema.ts +++ b/packages/gatsby-source-shopify/src/plugin-options-schema.ts @@ -43,7 +43,7 @@ export function pluginOptionsSchema({ Joi }: PluginOptionsSchemaArgs): unknown { `Not set by default. If set to a string (example \`MyStore\`) node names will be \`allMyStoreShopifyProducts\` instead of \`allShopifyProducts\`` ), apiVersion: Joi.string() - .default(`2022-04`) + .default(`2024-04`) .description( `The API version that should be used. More information: https://shopify.dev/docs/api/usage/versioning` ), diff --git a/packages/gatsby-source-shopify/src/query-builders/collections-query.ts b/packages/gatsby-source-shopify/src/query-builders/collections-query.ts index 7207be6377d19..abf77341fd2c1 100644 --- a/packages/gatsby-source-shopify/src/query-builders/collections-query.ts +++ b/packages/gatsby-source-shopify/src/query-builders/collections-query.ts @@ -73,7 +73,10 @@ export class CollectionsQuery extends BulkQuery { } } } - productsCount + productsCount { + count + precision + } ruleSet { appliedDisjunctively rules { diff --git a/packages/gatsby-source-shopify/src/query-builders/product-variants-query.ts b/packages/gatsby-source-shopify/src/query-builders/product-variants-query.ts index e07dd6c48a498..b6635d5090712 100644 --- a/packages/gatsby-source-shopify/src/query-builders/product-variants-query.ts +++ b/packages/gatsby-source-shopify/src/query-builders/product-variants-query.ts @@ -47,7 +47,10 @@ export class ProductVariantsQuery extends BulkQuery { inventoryLevels { edges { node { - available + quantities(names: ["incoming", "available", "committed", "reserved", "damaged", "safety_stock", "quality_control"]) { + name + quantity + } id location { id @@ -56,7 +59,10 @@ export class ProductVariantsQuery extends BulkQuery { } } legacyResourceId - locationsCount + locationsCount { + count + precision + } provinceCodeOfOrigin requiresShipping sku @@ -111,7 +117,10 @@ export class ProductVariantsQuery extends BulkQuery { name value } - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } sku storefrontId taxCode diff --git a/packages/gatsby-source-shopify/src/query-builders/products-query.ts b/packages/gatsby-source-shopify/src/query-builders/products-query.ts index 189f7087744ce..5408678af4bfd 100644 --- a/packages/gatsby-source-shopify/src/query-builders/products-query.ts +++ b/packages/gatsby-source-shopify/src/query-builders/products-query.ts @@ -151,7 +151,10 @@ export class ProductsQuery extends BulkQuery { } } } - mediaCount + mediaCount { + count + precision + } metafields { edges { node { @@ -200,7 +203,10 @@ export class ProductsQuery extends BulkQuery { productType publishedAt requiresSellingPlan - sellingPlanGroupCount + sellingPlanGroupsCount { + count + precision + } seo { description title diff --git a/packages/gatsby-source-shopify/src/type-builders/collection-type.ts b/packages/gatsby-source-shopify/src/type-builders/collection-type.ts index f90eee446aecb..9d204610e9afa 100644 --- a/packages/gatsby-source-shopify/src/type-builders/collection-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/collection-type.ts @@ -11,7 +11,7 @@ export function collectionTypeBuilder(prefix: string): string { metafield(namespace: String! key: String!): ${prefix}Metafield metafields: [${prefix}Metafield!]! @link(from: "metafields___NODE", by: "id") products: [${prefix}Product!]! @link(from: "products___NODE", by: "id") - productsCount: Int! + productsCount: ${prefix}Count! ruleSet: ${prefix}CollectionRuleSet seo: ${prefix}SEO! shopifyId: String! diff --git a/packages/gatsby-source-shopify/src/type-builders/common-type.ts b/packages/gatsby-source-shopify/src/type-builders/common-type.ts index aa825f4f3eeeb..cb10e3c99f281 100644 --- a/packages/gatsby-source-shopify/src/type-builders/common-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/common-type.ts @@ -511,5 +511,15 @@ export function commonTypeBuilder(prefix: string): string { POUNDS OUNCES } + + enum ${prefix}CountPrecision { + EXACT + AT_LEAST + } + + type ${prefix}Count { + count: Int! + precision: ${prefix}CountPrecision! + } ` } diff --git a/packages/gatsby-source-shopify/src/type-builders/location-type.ts b/packages/gatsby-source-shopify/src/type-builders/location-type.ts index 2cdd78fba8d3b..e20cf780d4193 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -24,9 +24,9 @@ export function locationTypeBuilder(prefix: string): string { duplicateSkuCount: Int! harmonizedSystemCode: String inventoryHistoryUrl: String - inventoryLevels: [${prefix}InventoryLevel!]! @link(from: "inventoryLevels___NODE", by: "id") + inventoryLevels: [${prefix}InventoryLevel!]! @link(by: "id") @proxy(from: "inventoryLevels___NODE", fromNode: true) legacyResourceId: String! - locationsCount: Int! + locationsCount: ${prefix}Count! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -38,9 +38,21 @@ export function locationTypeBuilder(prefix: string): string { variant: ${prefix}ProductVariantConnection! } + type ${prefix}InventoryQuantity { + name: String! + quantity: Int! + } + type ${prefix}InventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users - available: Int! + quantities: [${prefix}InventoryQuantity!]! + available: Int! @proxy(from: "quantities") @selectQuantityByName(name: "available") + incoming: Int! @proxy(from: "quantities") @selectQuantityByName(name: "incoming") + committed: Int! @proxy(from: "quantities") @selectQuantityByName(name: "committed") + reserved: Int! @proxy(from: "quantities") @selectQuantityByName(name: "reserved") + damaged: Int! @proxy(from: "quantities") @selectQuantityByName(name: "damaged") + safety_stock: Int! @proxy(from: "quantities") @selectQuantityByName(name: "safety_stock") + quality_control: Int! @proxy(from: "quantities") @selectQuantityByName(name: "quality_control") id: ID! location: ${prefix}Location! @link(from: "_location", by: "id") shopifyId: String! diff --git a/packages/gatsby-source-shopify/src/type-builders/product-type.ts b/packages/gatsby-source-shopify/src/type-builders/product-type.ts index e4c4372e78aa0..d194728a99f77 100644 --- a/packages/gatsby-source-shopify/src/type-builders/product-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/product-type.ts @@ -16,7 +16,7 @@ export function productTypeBuilder(prefix: string): string { isGiftCard: Boolean! legacyResourceId: String! media: [${prefix}Media!]! @link(from: "media___NODE", by: "id") - mediaCount: Int! + mediaCount: ${prefix}Count! metafield(namespace: String! key: String!): ${prefix}Metafield metafields: [${prefix}Metafield!]! @link(from: "metafields___NODE", by: "id") onlineStorePreviewUrl: String @@ -27,7 +27,7 @@ export function productTypeBuilder(prefix: string): string { productType: String! publishedAt: Date @dateformat requiresSellingPlan: Boolean! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: ${prefix}Count! seo: ${prefix}SEO! shopifyId: String! status: ${prefix}ProductStatus! diff --git a/packages/gatsby-source-shopify/src/type-builders/product-variant-type.ts b/packages/gatsby-source-shopify/src/type-builders/product-variant-type.ts index f66f0d2254725..f6d931715fab0 100644 --- a/packages/gatsby-source-shopify/src/type-builders/product-variant-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/product-variant-type.ts @@ -21,7 +21,7 @@ export function productVariantTypeBuilder(prefix: string): string { product: ${prefix}Product! @link(from: "_product", by: "id") requiresShipping: Boolean! @deprecated(reason: "Use \`InventoryItem.requiresShipping\` instead.") selectedOptions: [${prefix}SelectedOption!]! - sellingPlanGroupCount: Int! + sellingPlanGroupsCount: ${prefix}Count! sku: String shopifyId: String! storefrontId: String!