Skip to content

Commit 39a4b7b

Browse files
Afstklaclaude
andcommitted
Fix Shopify GraphQL query field errors
- Replace deprecated acceptsMarketing with emailMarketingConsent in Customer object - Update ProductVariant weight fields to use inventoryItem.measurement.weight structure - Replace requestedFulfillmentServiceId with requestedFulfillmentService object - Update fulfillment service object to include correct fields (id, serviceName, handle) These changes align with the current Shopify GraphQL API schema and fix the "Field doesn't exist" errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cc0cde6 commit 39a4b7b

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

components/shopify_developer_app/common/queries.mjs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const GET_ORDER = `
9696
email
9797
phone
9898
note
99-
acceptsMarketing
99+
emailMarketingConsent
100100
createdAt
101101
updatedAt
102102
verifiedEmail
@@ -197,8 +197,15 @@ const GET_ORDER = `
197197
title
198198
sku
199199
barcode
200-
weight
201-
weightUnit
200+
inventoryItem {
201+
id
202+
measurement {
203+
weight {
204+
value
205+
unit
206+
}
207+
}
208+
}
202209
inventoryQuantity
203210
price
204211
compareAtPrice
@@ -279,7 +286,11 @@ const GET_ORDER = `
279286
code
280287
source
281288
carrierIdentifier
282-
requestedFulfillmentServiceId
289+
requestedFulfillmentService {
290+
id
291+
serviceName
292+
handle
293+
}
283294
deliveryCategory
284295
originalPriceSet {
285296
shopMoney {
@@ -331,8 +342,9 @@ const GET_ORDER = `
331342
trackingNumbers
332343
trackingUrls
333344
service {
345+
id
334346
serviceName
335-
shippingMethods
347+
handle
336348
}
337349
fulfillmentLineItems(first: 250) {
338350
edges {
@@ -598,7 +610,7 @@ const LIST_ORDERS = `
598610
lastName
599611
email
600612
phone
601-
acceptsMarketing
613+
emailMarketingConsent
602614
defaultAddress {
603615
id
604616
address1

0 commit comments

Comments
 (0)