Orders GraphQL query: matching FulfillmentOrders with ShippingLines

Hi all!

We are looking for a way to map FulfillmentOrders to ShippingLines in the orders query:
https://shopify.dev/docs/api/admin-graphql/2026-04/queries/orders

When an order has more than one shipping line and more than one fulfillment order, there doesn’t seem to be an explicit way to understand which shipping line belongs to which fulfillment order.

Is there any way to determine this relationship through the Admin GraphQL API?

Related docs:
https://shopify.dev/docs/api/admin-graphql/2026-01/connections/FulfillmentOrderConnection
https://shopify.dev/docs/api/admin-graphql/2026-01/connections/ShippingLineConnection

Hey @SPS_Commerce! You’re right that this relationship is not exposed directly in the 2026-04 Admin GraphQL schema.

If you can use our release candidate 2026-07, the new shippingLine field on FulfillmentOrderLineItem is the field to use. It returns the ShippingLine associated with that fulfillment order line item when one is available.

That means the mapping is at the fulfillment order line item level rather than directly on FulfillmentOrder itself. You can query it like this.

query OrderFulfillmentShippingLines($id: ID!) {
  order(id: $id) {
    fulfillmentOrders(first: 10) {
      nodes {
        id
        lineItems(first: 50) {
          nodes {
            id
            totalQuantity
            lineItem {
              id
              name
            }
            shippingLine {
              id
              code
              title
              source
              shippingRateHandle
            }
          }
        }
      }
    }
  }
}

If you need to support 2026-04 or earlier, there is not an equivalent explicit FulfillmentOrder to ShippingLine relationship.

deliveryMethod.serviceCode and deliveryMethod.presentedName can help describe the fulfillment order’s delivery method, but they are not the same as the ShippingLine object.

Also make sure to handle shippingLine: null, since a fulfillment order line item might not always have an associated shipping line. I hope this helps!

Hey @Donal-Shopify, this is really useful, thank you!