# orderEditSetQuantity - admin-graphql - MUTATION Version: 2025-01 ## Description Sets the quantity of a line item on an order that is being edited. For more information on how to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). ### Access Scopes `write_order_edits` access scope. ## Arguments * [id](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) to edit. The edit changes the quantity on the line item. * [lineItemId](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - The ID of the calculated line item to edit. * [locationId](/docs/api/admin-graphql/2025-01/scalars/ID): ID - The ID of the location. If 'restock' is set to true, the restocked item will be made available at the specified location. * [quantity](/docs/api/admin-graphql/2025-01/scalars/Int): Int! - The new quantity to set for the line item. This value cannot be negative. * [restock](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean - Whether or not to restock the line item when the updated quantity is less than the original quantity. ## Returns * [calculatedLineItem](/docs/api/admin-graphql/2025-01/objects/CalculatedLineItem): CalculatedLineItem The calculated line item with the edits applied but not saved. * [calculatedOrder](/docs/api/admin-graphql/2025-01/objects/CalculatedOrder): CalculatedOrder The calculated order with the edits applied but not saved. * [userErrors](/docs/api/admin-graphql/2025-01/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples