Problem
The MailingAddressInput documentation marks no name fields as required. In practice, however, the Admin GraphQL API enforces lastName on shippingAddress inconsistently across the Order and DraftOrder mutations — sometimes silently dropping the address, sometimes erroring, sometimes accepting it. The behaviour is non-deterministic from the caller’s perspective and not reflected in the schema or docs.
We believe this is a bug — or at minimum a documentation gap that needs to be closed. A prior community thread reports the same symptom: shippingAddress and billingAddress are not saving to order via orderCreate.
Reproduction
In all four cases below, the shippingAddress input is identical except that lastName is omitted (or empty). According to the schema, this should be valid.
1. orderCreate No userErrors are returned. The order is created, but the shippingAddress is silently dropped with no indication to the caller.
2. orderUpdate Returns a userError complaining that lastName is required.
3. draftOrderCreate Accepted without error. The draft order persists a shippingAddress with an empty lastName.
4. draftOrderComplete (promote draft → order) The draft’s shippingAddress (with missing lastName) is carried over to the resulting order — it is not dropped as in case 1. However, any subsequent orderUpdate on that order then fails with the same lastName error as case 2, even if the update does not touch the address.
Expected behaviour
One of the following, applied consistently across all four mutations:
-
lastNameis genuinely optional — accept the address as written, and update the docs/schema accordingly. (Preferred.) -
lastNameis required — mark it as non-null inMailingAddressInput, and return auserError(never silently drop) on every mutation that takes a shipping address.
The current state — silent drops on orderCreate, userErrors on orderUpdate, persisted-but-broken state on draft orders — is the worst of all worlds: callers cannot detect the failure at write time, and the resulting order is then permanently unupdatable without first patching the address.
Ask
Could the API team please confirm whether lastName is intended to be required, and either (a) enforce it consistently with a userError on all mutations, or (b) remove the enforcement entirely? Either resolution would be acceptable; the silent-drop variant is what makes this currently a production hazard.
Happy to provide concrete request/response payloads if helpful.