deliveryProfileUpdate mutation seems broken

Highlighted
Shopify Partner
26 2 4

This is weird. I'm trying to reset an existing delivery profile via the graphql API.

 

mutation ($id: ID!, $profile: DeliveryProfileInput!) {
deliveryProfileUpdate(id: $id, profile: $profile) {

The variables I'm passing in:

{
  "id": "gid://shopify/DeliveryProfile/56372363323",
  "profile": {
    "name": "blah blah blah",
    "locationGroupsToCreate": [
      {
        "locations": [
          "gid://shopify/Location/38143131707"
        ],
        "zonesToCreate": [...some stuff...]
      }
    ],
    "locationGroupsToDelete": [
      "gid://shopify/DeliveryLocationGroup/56843239483"
    ]
  }
}

 

After this runs, I end up with a new DeliveryLocationGroup that is missing a location. Here's what's in the deliveryprofile when I fetch it:

 

{
   "locationGroup": {
       "id": "gid://shopify/DeliveryLocationGroup/56843272251",
       "locations": {
       "edges": []
    }
},

This seems wrong. Is there some rule that I can't create and delete in the same mutation?

 

Thans in advance

0 Likes
Highlighted
Shopify Partner
26 2 4

Some extra information:

 

The location is a fulfillmentservice location. I can't seem to add it to the delivery profile either on create or with an update afterwards. The graphql api just silently accepts the create, then ignores it. Providing a bogus location gives me an error message.

0 Likes
Highlighted
Shopify Partner
26 2 4

Maybe locations for fulfillment services never show up in the edges of a delivery profile? Is this documented somewhere?

 

This is making me insane :-(

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 130

Hey @stickfigure,

 

If you're still having trouble with this, can you kindly try the request again and provide the X-Request-ID from the response headers? I can use this to check our logs and hopefully pin-point the issue.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes