--- title: >- DraftOrderLineItem.grams field removed in 2026-07 - Shopify developer changelog description: >- Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: >- https://shopify.dev/changelog/draftorderlineitemgrams-field-removed-in-2026-07 md: >- https://shopify.dev/changelog/draftorderlineitemgrams-field-removed-in-2026-07.md metadata: effectiveApiVersion: 2026-07 affectedApi: [] primaryTag: displayName: API handle: api secondaryTag: displayName: Breaking API Change handle: breaking-api-change indicatesActionRequired: false createdAt: '2026-04-10T17:12:46-04:00' postedAt: '2026-04-13T10:00:00-04:00' updatedAt: '2026-04-14T13:30:57-04:00' effectiveAt: '2026-04-11T12:00:00-04:00' --- April 13, 2026 Tags: * API * 2026-07 # DraftOrderLineItem.grams field removed in 2026-07 ## What's changing We are removing the grams field from the [DraftOrderLineItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem) object in the Admin GraphQL API, starting with version 2026-07. This field was deprecated over 8 years ago. After the 2026-04 API version becomes unsupported, any queries referencing DraftOrderLineItem.grams will return an error. ## What you need to do Replace any usage of grams with the weight field on [DraftOrderLineItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem). The weight field returns both a value and a unit, giving you more flexibility than the old grams integer. Before (deprecated): ```query draftOrder(id: "gid://shopify/DraftOrder/1") { lineItems(first: 5) { nodes { grams } } } } ``` After: ```query draftOrder(id: "gid://shopify/DraftOrder/1") { lineItems(first: 5) { nodes { weight { value unit } } } } } ``` ## Why we made this change The grams field only supported one unit and could overflow for large weights. The weight field uses a WeightInput with both value and unit, which is more flexible and consistent with how weight works elsewhere in the platform. ## Need help? For more details, see the [DraftOrderLineItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem) reference docs. If you have questions about this change, please reach out through the [Shopify Partners community](https://community.shopify.com/?utm_source=changelog\&utm_medium=changelog\&utm_campaign=draftorderlineitem_grams_deprecation\&utm_content=partner_community_link).