A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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"
}
}
]
}
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.