From a862a4c4c95cc53d3226131f41a00a5e5469d1e8 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Tue, 18 Mar 2025 11:59:12 -0400 Subject: [PATCH 01/10] chore: sort the queried fields --- .../src/type-builders/product-variant-type.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 b55f2b2103b92..099b0591ab0b0 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 @@ -22,11 +22,11 @@ export function productVariantTypeBuilder(prefix: string): string { requiresShipping: Boolean! @deprecated(reason: "Use \`InventoryItem.requiresShipping\` instead.") selectedOptions: [${prefix}SelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: "sellingPlanGroupsCount.count") - sku: String shopifyId: String! + sku: String storefrontId: String! - taxCode: String taxable: Boolean! + taxCode: String title: String! updatedAt: Date! @dateformat weight: Float @@ -34,8 +34,8 @@ export function productVariantTypeBuilder(prefix: string): string { } enum ${prefix}ProductVariantInventoryPolicy { - DENY CONTINUE + DENY } type ${prefix}ProductVariantPricePair { From 4c5bd7b6a8320b70b8e1a0bfe10d95dabb598f42 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Tue, 18 Mar 2025 12:41:33 -0400 Subject: [PATCH 02/10] feat: address breaking api changes when upgrading to 2024-07 --- .../src/plugin-options-schema.ts | 2 +- .../src/query-builders/locations-query.ts | 1 - .../query-builders/product-variants-query.ts | 9 ++++++--- .../src/type-builders/location-type.ts | 19 ++++++++++++++++++- .../src/type-builders/product-variant-type.ts | 3 --- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/packages/gatsby-source-shopify/src/plugin-options-schema.ts b/packages/gatsby-source-shopify/src/plugin-options-schema.ts index 008f3aca51f41..68c1ec773f57c 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(`2024-04`) + .default(`2024-07`) .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/locations-query.ts b/packages/gatsby-source-shopify/src/query-builders/locations-query.ts index 022a6cb8cba00..23b8c88b26a9e 100644 --- a/packages/gatsby-source-shopify/src/query-builders/locations-query.ts +++ b/packages/gatsby-source-shopify/src/query-builders/locations-query.ts @@ -49,7 +49,6 @@ export class LocationsQuery extends BulkQuery { handle id inventoryManagement - productBased serviceName shippingMethods { code 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 b6635d5090712..aaa80558718b6 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 @@ -63,6 +63,12 @@ export class ProductVariantsQuery extends BulkQuery { count precision } + measurement { + weight { + unit + value + } + } provinceCodeOfOrigin requiresShipping sku @@ -112,7 +118,6 @@ export class ProductVariantsQuery extends BulkQuery { product { id } - requiresShipping selectedOptions { name value @@ -127,8 +132,6 @@ export class ProductVariantsQuery extends BulkQuery { taxable title updatedAt - weight - weightUnit metafields { edges { node { 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 90db0adda0e7f..f063733f99865 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -5,7 +5,6 @@ export function locationTypeBuilder(prefix: string): string { fulfillmentOrdersOptIn: Boolean! handle: String! inventoryManagement: Boolean! - productBased: Boolean! @deprecated(reason: "\`productBased\` will be removed in version 2024-07, non-product based fulfillment services are no longer supported") serviceName: String! shippingMethods: [${prefix}ShippingMethod!]! shopifyId: String! @@ -27,6 +26,7 @@ export function locationTypeBuilder(prefix: string): string { inventoryLevels: [${prefix}InventoryLevel!]! @link(by: "id") @proxy(from: "inventoryLevels___NODE", fromNode: true) legacyResourceId: String! locationsCount: Int! @proxy(from: "locationsCount.count") + measurement: ${prefix}InventoryItemMeasurement provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -38,6 +38,11 @@ export function locationTypeBuilder(prefix: string): string { variant: ${prefix}ProductVariantConnection! } + type ${prefix}InventoryItemMeasurement { + id: ID! + weight: ${prefix}Weight + } + type ${prefix}InventoryQuantity { name: String! quantity: Int! @@ -97,6 +102,18 @@ export function locationTypeBuilder(prefix: string): string { label: String! } + type ${prefix}Weight { + unit: ${prefix}WeightUnit! + value: Float! + } + + enum ${prefix}WeightUnit { + GRAMS + KILOGRAMS + OUNCES + POUNDS + } + extend type ${prefix}ProductVariant { inventoryItem: ${prefix}InventoryItem! } 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 099b0591ab0b0..6697009226581 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 @@ -19,7 +19,6 @@ export function productVariantTypeBuilder(prefix: string): string { presentmentPrices: [${prefix}ProductVariantPricePair!]! price: Float! product: ${prefix}Product! @link(from: "_product", by: "id") - requiresShipping: Boolean! @deprecated(reason: "Use \`InventoryItem.requiresShipping\` instead.") selectedOptions: [${prefix}SelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: "sellingPlanGroupsCount.count") shopifyId: String! @@ -29,8 +28,6 @@ export function productVariantTypeBuilder(prefix: string): string { taxCode: String title: String! updatedAt: Date! @dateformat - weight: Float - weightUnit: ${prefix}WeightUnit! } enum ${prefix}ProductVariantInventoryPolicy { From f9458559f1337f855c066c5478262dee47f84027 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Tue, 18 Mar 2025 12:45:08 -0400 Subject: [PATCH 03/10] feat!: address breaking changes when upgrading to 2024-10 --- packages/gatsby-source-shopify/src/plugin-options-schema.ts | 2 +- .../src/query-builders/locations-query.ts | 4 ---- .../src/type-builders/location-type.ts | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/gatsby-source-shopify/src/plugin-options-schema.ts b/packages/gatsby-source-shopify/src/plugin-options-schema.ts index 68c1ec773f57c..397b3c09136e7 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(`2024-07`) + .default(`2024-10`) .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/locations-query.ts b/packages/gatsby-source-shopify/src/query-builders/locations-query.ts index 23b8c88b26a9e..0b5977c01d0d8 100644 --- a/packages/gatsby-source-shopify/src/query-builders/locations-query.ts +++ b/packages/gatsby-source-shopify/src/query-builders/locations-query.ts @@ -50,10 +50,6 @@ export class LocationsQuery extends BulkQuery { id inventoryManagement serviceName - shippingMethods { - code - label - } type } fulfillsOnlineOrders 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 f063733f99865..7e3822ef6f6e2 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -6,7 +6,6 @@ export function locationTypeBuilder(prefix: string): string { handle: String! inventoryManagement: Boolean! serviceName: String! - shippingMethods: [${prefix}ShippingMethod!]! shopifyId: String! type: ${prefix}FulfillmentServiceType! } @@ -97,11 +96,6 @@ export function locationTypeBuilder(prefix: string): string { zip: String } - type ${prefix}ShippingMethod { - code: String! - label: String! - } - type ${prefix}Weight { unit: ${prefix}WeightUnit! value: Float! From 31dfa61eb51d00be2b99518ef8e03ea814bf5472 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Tue, 18 Mar 2025 12:46:49 -0400 Subject: [PATCH 04/10] fix: address breaking changes when upgrading to 2025-01 --- packages/gatsby-source-shopify/src/plugin-options-schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-source-shopify/src/plugin-options-schema.ts b/packages/gatsby-source-shopify/src/plugin-options-schema.ts index 397b3c09136e7..dff02c70bc26b 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(`2024-10`) + .default(`2025-01`) .description( `The API version that should be used. More information: https://shopify.dev/docs/api/usage/versioning` ), From 8d527b345b63d9d500ea72f470a385cae62379e2 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 11:13:42 -0400 Subject: [PATCH 05/10] fix: add deprecation message for fulfillmentOrdersOptIn --- .../gatsby-source-shopify/src/type-builders/location-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7e3822ef6f6e2..82205eed0394b 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -2,7 +2,7 @@ export function locationTypeBuilder(prefix: string): string { return ` type ${prefix}FulfillmentService { callbackUrl: String - fulfillmentOrdersOptIn: Boolean! + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: "Property is always set to true on correctly functioning fulfillment services.") handle: String! inventoryManagement: Boolean! serviceName: String! From 74e031caff0478d8ec48e3a458396b254e01f181 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 11:14:32 -0400 Subject: [PATCH 06/10] fix: make measurement a required field to match shopify api response --- .../gatsby-source-shopify/src/type-builders/location-type.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 82205eed0394b..2da4e8602acde 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -25,7 +25,7 @@ export function locationTypeBuilder(prefix: string): string { inventoryLevels: [${prefix}InventoryLevel!]! @link(by: "id") @proxy(from: "inventoryLevels___NODE", fromNode: true) legacyResourceId: String! locationsCount: Int! @proxy(from: "locationsCount.count") - measurement: ${prefix}InventoryItemMeasurement + measurement: ${prefix}InventoryItemMeasurement! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -38,7 +38,6 @@ export function locationTypeBuilder(prefix: string): string { } type ${prefix}InventoryItemMeasurement { - id: ID! weight: ${prefix}Weight } From 5c245809fd503e2110945037e37553ec7c3c4527 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 11:15:03 -0400 Subject: [PATCH 07/10] fix: object definition already in common --- .../src/type-builders/location-type.ts | 7 ------- 1 file changed, 7 deletions(-) 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 2da4e8602acde..0f08c50e7476c 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -100,13 +100,6 @@ export function locationTypeBuilder(prefix: string): string { value: Float! } - enum ${prefix}WeightUnit { - GRAMS - KILOGRAMS - OUNCES - POUNDS - } - extend type ${prefix}ProductVariant { inventoryItem: ${prefix}InventoryItem! } From 7f9e2d7d7408a134bd509cbf175b68cf8f6c14f7 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 11:32:56 -0400 Subject: [PATCH 08/10] fix: add backwards compatibility for weight/weightUnit fields --- .../gatsby-source-shopify/src/type-builders/location-type.ts | 2 ++ 1 file changed, 2 insertions(+) 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 0f08c50e7476c..99b1205573788 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -102,6 +102,8 @@ export function locationTypeBuilder(prefix: string): string { extend type ${prefix}ProductVariant { inventoryItem: ${prefix}InventoryItem! + weight: Float @proxy(from: "inventoryItem.measurement.weight.value") @deprecated(reason: "Query \`inventoryItem.measurement.weight.value\` directly") + weightUnit: ${prefix}WeightUnit! @proxy(from: "inventoryItem.measurement.weight.unit") @deprecated(reason: "Query \`inventoryItem.measurement.weight.unit\` directly") } ` } From 295f40a81000a8dd09af2b8485925da06be4df19 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 11:45:44 -0400 Subject: [PATCH 09/10] fix: add deprecation messages for proxied quantities fields --- .../src/type-builders/location-type.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 99b1205573788..105045f4b6e92 100644 --- a/packages/gatsby-source-shopify/src/type-builders/location-type.ts +++ b/packages/gatsby-source-shopify/src/type-builders/location-type.ts @@ -49,13 +49,13 @@ export function locationTypeBuilder(prefix: string): string { type ${prefix}InventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users 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") + available: Int! @proxy(from: "quantities") @selectQuantityByName(name: "available") @deprecated(reason: "Query \`quantities\` field directly") + incoming: Int! @proxy(from: "quantities") @selectQuantityByName(name: "incoming") @deprecated(reason: "Query \`quantities\` field directly") + committed: Int! @proxy(from: "quantities") @selectQuantityByName(name: "committed") @deprecated(reason: "Query \`quantities\` field directly") + reserved: Int! @proxy(from: "quantities") @selectQuantityByName(name: "reserved") @deprecated(reason: "Query \`quantities\` field directly") + damaged: Int! @proxy(from: "quantities") @selectQuantityByName(name: "damaged") @deprecated(reason: "Query \`quantities\` field directly") + safety_stock: Int! @proxy(from: "quantities") @selectQuantityByName(name: "safety_stock") @deprecated(reason: "Query \`quantities\` field directly") + quality_control: Int! @proxy(from: "quantities") @selectQuantityByName(name: "quality_control") @deprecated(reason: "Query \`quantities\` field directly") id: ID! location: ${prefix}Location! @link(from: "_location", by: "id") shopifyId: String! From 36ea6b1b39519a2bf72166ceb70dfe1c20a9179c Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 19 Mar 2025 12:03:18 -0400 Subject: [PATCH 10/10] test: update snapshots --- .../__snapshots__/create-operations.ts.snap | 56 +++++------ .../create-schema-customization.ts.snap | 98 +++++++++---------- 2 files changed, 72 insertions(+), 82 deletions(-) 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 f4aa1881bca84..57eb5cedc8e8f 100644 --- a/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap +++ b/packages/gatsby-source-shopify/__tests__/__snapshots__/create-operations.ts.snap @@ -298,6 +298,12 @@ Array [ count precision } + measurement { + weight { + unit + value + } + } provinceCodeOfOrigin requiresShipping sku @@ -347,7 +353,6 @@ Array [ product { id } - requiresShipping selectedOptions { name value @@ -362,8 +367,6 @@ Array [ taxable title updatedAt - weight - weightUnit metafields { edges { node { @@ -596,12 +599,7 @@ Array [ handle id inventoryManagement - productBased serviceName - shippingMethods { - code - label - } type } fulfillsOnlineOrders @@ -962,6 +960,12 @@ Array [ count precision } + measurement { + weight { + unit + value + } + } provinceCodeOfOrigin requiresShipping sku @@ -1011,7 +1015,6 @@ Array [ product { id } - requiresShipping selectedOptions { name value @@ -1026,8 +1029,6 @@ Array [ taxable title updatedAt - weight - weightUnit metafields { edges { node { @@ -1260,12 +1261,7 @@ Array [ handle id inventoryManagement - productBased serviceName - shippingMethods { - code - label - } type } fulfillsOnlineOrders @@ -1626,6 +1622,12 @@ Array [ count precision } + measurement { + weight { + unit + value + } + } provinceCodeOfOrigin requiresShipping sku @@ -1675,7 +1677,6 @@ Array [ product { id } - requiresShipping selectedOptions { name value @@ -1690,8 +1691,6 @@ Array [ taxable title updatedAt - weight - weightUnit metafields { edges { node { @@ -1924,12 +1923,7 @@ Array [ handle id inventoryManagement - productBased serviceName - shippingMethods { - code - label - } type } fulfillsOnlineOrders @@ -2290,6 +2284,12 @@ Array [ count precision } + measurement { + weight { + unit + value + } + } provinceCodeOfOrigin requiresShipping sku @@ -2339,7 +2339,6 @@ Array [ product { id } - requiresShipping selectedOptions { name value @@ -2354,8 +2353,6 @@ Array [ taxable title updatedAt - weight - weightUnit metafields { edges { node { @@ -2588,12 +2585,7 @@ Array [ handle id inventoryManagement - productBased serviceName - shippingMethods { - code - label - } type } fulfillsOnlineOrders 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 0f1f80abe52ab..283dae432386c 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 @@ -783,23 +783,20 @@ Array [ presentmentPrices: [__PREFIX__ShopifyProductVariantPricePair!]! price: Float! product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") - requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: \\"sellingPlanGroupsCount.count\\") - sku: String shopifyId: String! + sku: String storefrontId: String! - taxCode: String taxable: Boolean! + taxCode: String title: String! updatedAt: Date! @dateformat - weight: Float - weightUnit: __PREFIX__ShopifyWeightUnit! } enum __PREFIX__ShopifyProductVariantInventoryPolicy { - DENY CONTINUE + DENY } type __PREFIX__ShopifyProductVariantPricePair { @@ -890,12 +887,10 @@ Array [ " type __PREFIX__ShopifyFulfillmentService { callbackUrl: String - fulfillmentOrdersOptIn: Boolean! + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: \\"Property is always set to true on correctly functioning fulfillment services.\\") handle: String! inventoryManagement: Boolean! - productBased: Boolean! @deprecated(reason: \\"\`productBased\` will be removed in version 2024-07, non-product based fulfillment services are no longer supported\\") serviceName: String! - shippingMethods: [__PREFIX__ShopifyShippingMethod!]! shopifyId: String! type: __PREFIX__ShopifyFulfillmentServiceType! } @@ -915,6 +910,7 @@ Array [ inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(by: \\"id\\") @proxy(from: \\"inventoryLevels___NODE\\", fromNode: true) legacyResourceId: String! locationsCount: Int! @proxy(from: \\"locationsCount.count\\") + measurement: __PREFIX__ShopifyInventoryItemMeasurement! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -926,6 +922,10 @@ Array [ variant: __PREFIX__ShopifyProductVariantConnection! } + type __PREFIX__ShopifyInventoryItemMeasurement { + weight: __PREFIX__ShopifyWeight + } + type __PREFIX__ShopifyInventoryQuantity { name: String! quantity: Int! @@ -934,13 +934,13 @@ Array [ type __PREFIX__ShopifyInventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users 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\\") + available: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"available\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + incoming: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"incoming\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + committed: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"committed\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + reserved: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"reserved\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + damaged: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"damaged\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + safety_stock: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"safety_stock\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + quality_control: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"quality_control\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") id: ID! location: __PREFIX__ShopifyLocation! @link(from: \\"_location\\", by: \\"id\\") shopifyId: String! @@ -980,13 +980,15 @@ Array [ zip: String } - type __PREFIX__ShopifyShippingMethod { - code: String! - label: String! + type __PREFIX__ShopifyWeight { + unit: __PREFIX__ShopifyWeightUnit! + value: Float! } extend type __PREFIX__ShopifyProductVariant { inventoryItem: __PREFIX__ShopifyInventoryItem! + weight: Float @proxy(from: \\"inventoryItem.measurement.weight.value\\") @deprecated(reason: \\"Query \`inventoryItem.measurement.weight.value\` directly\\") + weightUnit: __PREFIX__ShopifyWeightUnit! @proxy(from: \\"inventoryItem.measurement.weight.unit\\") @deprecated(reason: \\"Query \`inventoryItem.measurement.weight.unit\` directly\\") } ", " @@ -1805,23 +1807,20 @@ Array [ presentmentPrices: [__PREFIX__ShopifyProductVariantPricePair!]! price: Float! product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") - requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: \\"sellingPlanGroupsCount.count\\") - sku: String shopifyId: String! + sku: String storefrontId: String! - taxCode: String taxable: Boolean! + taxCode: String title: String! updatedAt: Date! @dateformat - weight: Float - weightUnit: __PREFIX__ShopifyWeightUnit! } enum __PREFIX__ShopifyProductVariantInventoryPolicy { - DENY CONTINUE + DENY } type __PREFIX__ShopifyProductVariantPricePair { @@ -2627,23 +2626,20 @@ Array [ presentmentPrices: [__PREFIX__ShopifyProductVariantPricePair!]! price: Float! product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") - requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: \\"sellingPlanGroupsCount.count\\") - sku: String shopifyId: String! + sku: String storefrontId: String! - taxCode: String taxable: Boolean! + taxCode: String title: String! updatedAt: Date! @dateformat - weight: Float - weightUnit: __PREFIX__ShopifyWeightUnit! } enum __PREFIX__ShopifyProductVariantInventoryPolicy { - DENY CONTINUE + DENY } type __PREFIX__ShopifyProductVariantPricePair { @@ -2734,12 +2730,10 @@ Array [ " type __PREFIX__ShopifyFulfillmentService { callbackUrl: String - fulfillmentOrdersOptIn: Boolean! + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: \\"Property is always set to true on correctly functioning fulfillment services.\\") handle: String! inventoryManagement: Boolean! - productBased: Boolean! @deprecated(reason: \\"\`productBased\` will be removed in version 2024-07, non-product based fulfillment services are no longer supported\\") serviceName: String! - shippingMethods: [__PREFIX__ShopifyShippingMethod!]! shopifyId: String! type: __PREFIX__ShopifyFulfillmentServiceType! } @@ -2759,6 +2753,7 @@ Array [ inventoryLevels: [__PREFIX__ShopifyInventoryLevel!]! @link(by: \\"id\\") @proxy(from: \\"inventoryLevels___NODE\\", fromNode: true) legacyResourceId: String! locationsCount: Int! @proxy(from: \\"locationsCount.count\\") + measurement: __PREFIX__ShopifyInventoryItemMeasurement! provinceCodeOfOrigin: String requiresShipping: Boolean! shopifyId: String! @@ -2770,6 +2765,10 @@ Array [ variant: __PREFIX__ShopifyProductVariantConnection! } + type __PREFIX__ShopifyInventoryItemMeasurement { + weight: __PREFIX__ShopifyWeight + } + type __PREFIX__ShopifyInventoryQuantity { name: String! quantity: Int! @@ -2778,13 +2777,13 @@ Array [ type __PREFIX__ShopifyInventoryLevel implements Node @dontInfer { _location: String! # Temporary field so we don't break existing users 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\\") + available: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"available\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + incoming: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"incoming\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + committed: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"committed\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + reserved: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"reserved\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + damaged: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"damaged\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + safety_stock: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"safety_stock\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") + quality_control: Int! @proxy(from: \\"quantities\\") @selectQuantityByName(name: \\"quality_control\\") @deprecated(reason: \\"Query \`quantities\` field directly\\") id: ID! location: __PREFIX__ShopifyLocation! @link(from: \\"_location\\", by: \\"id\\") shopifyId: String! @@ -2824,13 +2823,15 @@ Array [ zip: String } - type __PREFIX__ShopifyShippingMethod { - code: String! - label: String! + type __PREFIX__ShopifyWeight { + unit: __PREFIX__ShopifyWeightUnit! + value: Float! } extend type __PREFIX__ShopifyProductVariant { inventoryItem: __PREFIX__ShopifyInventoryItem! + weight: Float @proxy(from: \\"inventoryItem.measurement.weight.value\\") @deprecated(reason: \\"Query \`inventoryItem.measurement.weight.value\` directly\\") + weightUnit: __PREFIX__ShopifyWeightUnit! @proxy(from: \\"inventoryItem.measurement.weight.unit\\") @deprecated(reason: \\"Query \`inventoryItem.measurement.weight.unit\` directly\\") } ", " @@ -3644,23 +3645,20 @@ Array [ presentmentPrices: [__PREFIX__ShopifyProductVariantPricePair!]! price: Float! product: __PREFIX__ShopifyProduct! @link(from: \\"_product\\", by: \\"id\\") - requiresShipping: Boolean! @deprecated(reason: \\"Use \`InventoryItem.requiresShipping\` instead.\\") selectedOptions: [__PREFIX__ShopifySelectedOption!]! sellingPlanGroupCount: Int! @proxy(from: \\"sellingPlanGroupsCount.count\\") - sku: String shopifyId: String! + sku: String storefrontId: String! - taxCode: String taxable: Boolean! + taxCode: String title: String! updatedAt: Date! @dateformat - weight: Float - weightUnit: __PREFIX__ShopifyWeightUnit! } enum __PREFIX__ShopifyProductVariantInventoryPolicy { - DENY CONTINUE + DENY } type __PREFIX__ShopifyProductVariantPricePair {