What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

draftOrderCreate mutation internal server errors

draftOrderCreate mutation internal server errors

keiraarts
Shopify Partner
55 8 11

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)
193 37 55

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.