From 504f5388d083d871ebe8b6dbcf7f626932af03f6 Mon Sep 17 00:00:00 2001 From: Alex Bair Date: Thu, 16 Jan 2025 10:43:14 -0500 Subject: [PATCH] source-shopify-native: add some fields to `products` Some fields that seem like they'd be useful for troubleshooting or identifying Shopify resources are added to `products`. --- .../source_shopify_native/graphql/products.py | 5 ++++ .../snapshots__capture__capture.stdout.json | 24 +++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/source-shopify-native/source_shopify_native/graphql/products.py b/source-shopify-native/source_shopify_native/graphql/products.py index bee30c029b..88c3e7da65 100644 --- a/source-shopify-native/source_shopify_native/graphql/products.py +++ b/source-shopify-native/source_shopify_native/graphql/products.py @@ -175,9 +175,12 @@ def build_query(start: datetime, end: datetime) -> str: }} inventoryItem {{ id + legacyResourceId + sku requiresShipping tracked measurement {{ + id weight {{ value unit @@ -189,8 +192,10 @@ def build_query(start: datetime, end: datetime) -> str: id location {{ id + name fulfillmentService {{ id + handle serviceName type }} diff --git a/source-shopify-native/tests/snapshots/snapshots__capture__capture.stdout.json b/source-shopify-native/tests/snapshots/snapshots__capture__capture.stdout.json index 3676427c3d..16f255880b 100644 --- a/source-shopify-native/tests/snapshots/snapshots__capture__capture.stdout.json +++ b/source-shopify-native/tests/snapshots/snapshots__capture__capture.stdout.json @@ -116,13 +116,16 @@ "image": null, "inventoryItem": { "id": "gid://shopify/InventoryItem/45258934976557", + "legacyResourceId": "45258934976557", "measurement": { + "id": "gid://shopify/InventoryItemMeasurement/44217186123821", "weight": { "unit": "POUNDS", "value": 0.0 } }, "requiresShipping": false, + "sku": null, "tracked": false }, "inventoryLevels": [ @@ -131,7 +134,8 @@ "id": "gid://shopify/InventoryLevel/108219858989?inventory_item_id=45258934976557", "location": { "fulfillmentService": null, - "id": "gid://shopify/Location/73871392813" + "id": "gid://shopify/Location/73871392813", + "name": "Shop location" } } ], @@ -164,13 +168,16 @@ "image": null, "inventoryItem": { "id": "gid://shopify/InventoryItem/45258935009325", + "legacyResourceId": "45258935009325", "measurement": { + "id": "gid://shopify/InventoryItemMeasurement/44217186156589", "weight": { "unit": "POUNDS", "value": 0.0 } }, "requiresShipping": false, + "sku": null, "tracked": false }, "inventoryLevels": [ @@ -179,7 +186,8 @@ "id": "gid://shopify/InventoryLevel/108219858989?inventory_item_id=45258935009325", "location": { "fulfillmentService": null, - "id": "gid://shopify/Location/73871392813" + "id": "gid://shopify/Location/73871392813", + "name": "Shop location" } } ], @@ -212,13 +220,16 @@ "image": null, "inventoryItem": { "id": "gid://shopify/InventoryItem/45258935042093", + "legacyResourceId": "45258935042093", "measurement": { + "id": "gid://shopify/InventoryItemMeasurement/44217186189357", "weight": { "unit": "POUNDS", "value": 0.0 } }, "requiresShipping": false, + "sku": null, "tracked": false }, "inventoryLevels": [ @@ -227,7 +238,8 @@ "id": "gid://shopify/InventoryLevel/108219858989?inventory_item_id=45258935042093", "location": { "fulfillmentService": null, - "id": "gid://shopify/Location/73871392813" + "id": "gid://shopify/Location/73871392813", + "name": "Shop location" } } ], @@ -260,13 +272,16 @@ "image": null, "inventoryItem": { "id": "gid://shopify/InventoryItem/45258935074861", + "legacyResourceId": "45258935074861", "measurement": { + "id": "gid://shopify/InventoryItemMeasurement/44217186222125", "weight": { "unit": "POUNDS", "value": 0.0 } }, "requiresShipping": false, + "sku": null, "tracked": false }, "inventoryLevels": [ @@ -275,7 +290,8 @@ "id": "gid://shopify/InventoryLevel/108219858989?inventory_item_id=45258935074861", "location": { "fulfillmentService": null, - "id": "gid://shopify/Location/73871392813" + "id": "gid://shopify/Location/73871392813", + "name": "Shop location" } } ],