Remove Customer from Order: Graphql

Topic summary

A developer is trying to remove a customer from an order using GraphQL, having previously accomplished this via the Admin REST API by setting order.customer = null.

Current Challenge:

  • The Shopify AI assistant suggested using the orderUpdate mutation with a customer: null parameter
  • This approach fails because the orderUpdate mutation doesn’t accept a customer parameter

Status:

  • The issue remains unresolved
  • Another user has asked if a GraphQL solution was found, indicating this is a shared need
  • No working GraphQL alternative has been identified in the discussion

This appears to be a migration challenge where REST API functionality may not have a direct GraphQL equivalent.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

I want to remove customer from an order using Graphql. Currently I use admin rest api for this

const { admin, session } = await authenticate.admin(request);

const order = new admin.rest.resources.Order({session: session});

order.id = 450789469;
order.customer = null;
await order.save({
  update: true,
});

Admin Rest Api - Orders

How can I do this in graphql?

I asked the dev assistant AI in shopify docs, and it gave me this

mutation UpdateOrderCustomer {
  orderUpdate(input: {id: "gid://shopify/Order/123456789", customer: null}) {
    order {
      id
      customer {
        id
      }
    }
    userErrors {
      field
      message
    }
  }
}

But it isn’t working, because there is no param for customer.

were you able to do it using gql?