Shopify Draft order Api Update

sivainguva
New Member
11 0 0

Hi recently updated the shopify Draft order API, After that i am not able to proceed to checkout it throws null error. So Here is my graphql query

mutation {
draftOrderCreate(input: {
customerId: "$userId",
customAttributes: [
#if( $quoteId )
{
key: "Quote ID",
value: "$quoteId"
}
#end
#if( $poNumber )
{
key: "PO Number",
value: "$poNumber"
}
#end
]
#if( $note )
note: "$note"
#end
#if ( $tags )
tags: "$tags"
#end
lineItems: [
#foreach( $lineItem in $lineItems )
{
variantId: "$lineItem.id"
quantity: $lineItem.quantity
requiresShipping: $lineItem.shipping.required
#if( $lineItem.attributes )
customAttributes: [
#foreach( $attribute in $lineItem.attributes.entrySet() )
{
key: "$attribute.key"
value: "$attribute.value"
},
#end
]
#end
}
#end
]
}) {
draftOrder {
id
invoiceUrl
}
userErrors {
field
message
}
}
}

 So after i update this file  by removing this 

requiresShipping: $lineItem.shipping.required
#if( $lineItem.attributes )
customAttributes: [
#foreach( $attribute in $lineItem.attributes.entrySet() )
{
key: "$attribute.key"
value: "$attribute.value"
},
#end

 

it worked but i am not able to see any shipping methods not even pickup

0 Likes