How to set weightUnit

Topic summary

A developer is attempting to use the new productSet GraphQL API to create a product with variants in a single operation but cannot find fields for weight or weightUnit.

Current Issue:

  • The productSet mutation appears to lack weight-related fields
  • When trying to use inventoryItem within the variants array, an error occurs: “Field inventoryItem is not defined on ProductSetVariantInput”

Expected Behavior:

Status: The question remains unanswered - unclear how to set weight properties when using the productSet API for product creation.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

I am looking at the productSet new api to create a product with variants, I can’t seem to see anything related to weightUnit or weight.

How am I able to set that? My goal is to use the create to do as much in one go as I can, but that seems to be missing

I see that "inventoryItem " gives

message": “Variable $productSet of type ProductSetInput! was provided invalid value for variants.0.inventoryItem (Field is not defined on ProductVariantSetInput)”,

This has measurement that I thought would be in the product set: https://shopify.dev/docs/api/admin-graphql/2024-10/input-objects/InventoryItemInput

Thanks

Grant