Potential bug with draftOrderUpdate mutation

Highlighted
New Member
1 0 0

I am creating orders successfully with the draftOrderCreate on the graphql admin api. I am adding custom_attributes (among other things) and that works perfectly. However when I then go back and use draftOrderUpdate, all I am updating is the shipping address. Somehow, though, all the custom attributes get blown away.

 

Here is my draftOrderUpdate

mutation draftOrderUpdate($id: ID!, $input: DraftOrderInput!) {
  draftOrderUpdate(id: $id, input: $input) {
    userErrors {
      field
      message
    }
    draftOrder {
      id
    }
  }
}

I am calling it like this 

shopifyStorefrontClient
    .mutate({
      mutation: draftOrderUpdate,
      variables: {
        id: orderId,
        input: {
          shippingAddress,
        },
      },
    })

All other items in the order are fine, just the customAttributes get blown away. Is this a bug?

0 Likes
Highlighted
Shopify Partner
1840 177 712

Confirming. 

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
1 Like
Highlighted
New Member
2 0 0

Having the same issue. No official response from Shopify on this?

0 Likes
Highlighted
Tourist
6 0 2

I'm attempting to update customAttributes on order, and i'm running into the same issue.  Has there been any new info on this? 

0 Likes