Bug in Shopify GraphQL API on draftOrderInvoiceSend mutation

Solved
Highlighted
Excursionist
24 1 3

Hi,

 

Sending an invoice on a draft order via the GraphQL with only id as input c.f. the documentation that states that only the id is mandatory, gives an error message:

Request:

mutation draftOrderInvoiceSend {
  draftOrderInvoiceSend(id: "gid://shopify/DraftOrder/530989678727") {
    draftOrder {
      id
    }
    userErrors {
      field
      message
    }
  }
}

Response:

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: a2bfd968-ae99-45c1-a1bf-1a6054922ed0 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "a2bfd968-ae99-45c1-a1bf-1a6054922ed0"
      }
    }
  ]
}

If I include the email parameter in the request, and whatever parameter on the email object, it works, e.g.:

mutation draftOrderInvoiceSend {
  draftOrderInvoiceSend(id: "gid://shopify/DraftOrder/530989678727", email: {customMessage: ""}) {
    draftOrder {
      id
    }
    userErrors {
      field
      message
    }
  }
}

Response:

{
  "data": {
    "draftOrderInvoiceSend": {
      "draftOrder": {
        "id": "gid://shopify/DraftOrder/530989678727"
      },
      "userErrors": []
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 990,
        "restoreRate": 50
      }
    }
  }
}

Thanks,

-Louise

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

Hey @Lull,

 

Thanks for reporting this, I'm able to replicate. Raising internally.

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes
Highlighted
Excursionist
24 1 3

Great, thanks.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

This is an accepted solution.

Hey @Lull,

 

This one has been resolved.

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes
Highlighted
Shopify Partner
50 2 6
Hi Scotty,

Sounds great, thanks.

-Louise
0 Likes