draftOrderCreate mutation internal server errors

keiraarts
Shopify Partner
47 7 9

Hey Shopify team! I'm running the draftOrderCreate mutation and getting internal server errors. 
Could someone take a look at the request ID and let me know what's wrong with the input?

 

 

 

mutation draftOrderCreate($input: DraftOrderInput!) {
	draftOrderCreate(input: $input) {
		draftOrder {
			id
		}
		userErrors {
			field
			message
		}
	}
}

 

 

 

 

 

{
	"errors": [
		{
			"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: b3b48e35-0d33-4290-9a76-72e4749c126f (include this in support requests).",
			"extensions": {
				"code": "INTERNAL_SERVER_ERROR",
				"requestId": "b3b48e35-0d33-4290-9a76-72e4749c126f"
			}
		}
	]
}

 

 

 

 

 

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca
Reply 1 (1)
GrahamS
Shopify Staff (Retired)
Shopify Staff (Retired)
193 36 53

The error is coming from the deprecated field "lineItems.grams" that you are including in the payload. I can see that you're already using the lineItems.weight array, which is the field that has been introduced to replace it, so you should be able to remove the grams field from your line item array in order to resolve this problem without impacting your overall API call.

To learn more visit the Shopify Help Center or the Community Blog.