Admin GraphQL API / 2026-07

LineItem.weight is
now available in the public Admin API (GraphQL)

From GraphQL Admin API 2026-07 onward, the weight of an order line item (LineItem) can be queried directly as a Weight object (value + unit). No more manually converting units from the REST grams field.

Page Outline
  1. What's Actually Changing (Understand in 30 Seconds)
  2. Diagram: Legacy (grams conversion) vs. New (direct Weight fetch)
  3. Structure of the Weight Object
  4. Legacy REST vs. New GraphQL Comparison
  5. Query Example
  6. 5 Key Points for Developers
  7. 3 Practical Use Cases
  8. One-Line Summary for Pitches

1What's Actually Changing

In the GraphQL Admin API, starting from version 2026-07, LineItem you can now query the weight field on the type.
What's returned is a Weight object with value and unit. This removes the need to convert units from the REST API's grams field.
grams

Before: converting grams from REST

The REST Admin API returns line item weight as an integer in grams (grams). If you wanted to work in kg or lb, you had to divide and label the unit yourself.

New: Fetch Weight directly via GraphQL

On the GraphQL Admin API from 2026-07 onward, weight { value unit } can be queried as-is. The value and unit are returned together, so conversion code is no longer needed.

2Diagram: Old (grams conversion) vs. New (direct Weight)

Order / LineItem Order line item Old (REST) grams(Int) Example: 1500 Manual unit conversion ÷1000 → kg, etc. Weight value on the app side Hotbed for conversion bugs New (GraphQL 2026-07) weight { value unit } Value and unit returned together No conversion step Use as-is Unit-aware implementation
The key point is that one conversion step is eliminated. Since the value and unit are returned together, conversion logic written assuming grams and unit mix-ups are less likely to occur.

3Structure of the Weight object

12.5

value

The numeric portion of the weight. Only meaningful when paired with a unit.

unit

unit

The unit portion of the weight. Returned together with the value, so there's no need to guess the unit separately when displaying or computing.

In this article, weight it's clarified that it's a Weight object with value and unit.The specific values (enum) that unit can take are not listed.When implementing, check the API schema (GraphQL's Weight / WeightUnit).

4Legacy REST vs. new GraphQL comparison

ItemBefore: REST Admin APIAfter: GraphQL Admin API (from 2026-07)
Target field LineItem's grams LineItem's weight
Return shape Scalar Integer in grams Object Weight(value + unit)
Unit handling Always fixed to grams; convert other units yourself Unit is returned together as `unit`
Conversion code Required Not required
Available versions Same as before GraphQL Admin API 2026-07 and later

* For REST, grams The article does not mention availability or deprecation (not stated). It only conveys that this is now usable on the GraphQL side. weight is now available.

5Example query

A representative query built from the field name (LineItem.weightWeight { value unit }) mentioned in the article. Check the API schema for the actual field structure.

# GraphQL Admin API (2026-07) query { order(id: "gid://shopify/Order/123") { lineItems(first: 10) { nodes { title weight { value unit } } } } }
You can retrieve the weight of an order and each line item in a single GraphQL query. The benefit is replacing multiple REST calls plus conversion logic with one structured response.

65 key points for developers

2026-07

1. Requires 2026-07 or later

This weight field is available from GraphQL Admin API version 2026-07. Clients targeting earlier versions cannot query it.

2. The return value is a struct

Not a scalar but Weight an object.value and unit are each retrieved as subfields.

3. No more grams conversion

From REST's grams you can remove the boilerplate that manually converted to kg/lb, etc. It also prevents unit mix-up bugs.

4. Available per line item (LineItem)

You can retrieve the weight per order line item rather than for the entire order. A granularity that can be used directly for per-line-item shipping and fee calculations.

5. A push for REST → GraphQL migration

Code that previously kept REST around just to fetch weight can now be handled entirely with GraphQL.The specific values that unit can take are not listed in the article, so when migrating, check the GraphQL schema's Weight / WeightUnit before implementing.

7Three use cases you can apply to your work

Shipping calculation
USE CASE 1

Simplifying weight-based shipping and delivery logic

Challenge
Fetching per-line-item weight via REST grams fetched the value and manually converted it to kg/lb for shipping calculations. Conversion logic was scattered across the codebase, becoming a hotbed for bugs.
Solution
On the 2026-07 GraphQL API, use LineItem.weight { value unit } to retrieve the value and unit as-is.
Impact
Reduces conversion code and prevents unit mix-ups. Maintenance of shipping rate logic gets lighter.
Technical notes
Since the unit ships alongside the value, locale-specific unit display can also be handled as a set with the value.
Shopify WMS
USE CASE 2

Unified data handoff for WMS/3PL and shipping label integrations

Problem
We had been maintaining a custom grams conversion adapter to pass line item weights to warehouse management systems and shipping label printers.
Action
Shift to GraphQL andweight adopt the value/unit directly as relay data.
Impact
Simpler integration code and fewer API calls, since orders + line item weights can be fetched in a single query.
Technical notes
The article does not specify the concrete values for unit, so map them against the units expected by the downstream integration via the schema beforehand.
Analysis by weight range
USE CASE 3

Weight data analysis and ETL ingestion

Problem
When trying to aggregate per-line-item weight in a BI or data platform, you had to ingest grams and then run a separate conversion step beforehand.
Solution
Ingest the GraphQL weight.value / weight.unit directly via ETL.
Impact
You can build shipping cost analyses by weight band, duty estimations, and more with less preprocessing.
Technical notes
Handling this alongside a REST → GraphQL migration project lets you unify the retrieval path for weight-related data.

8One-line summary for proposals

Order line item weights are now exposed directly through the GraphQL Admin API 2026-07 via a Weight object (value + unit),so you can read them as-is.
No more REST grams-conversion boilerplate —shipping calculations, warehouse integrations, and analytics get simpler."