Interfaces & Types
Each Product Details field has its own GraphQL type, named after the field’s handle. Queries shows how to request the field through Craft’s entry queries and set up the schema.
The [fieldHandle]_SnipcartField Type
A Product Details field with the handle productDetails returns the productDetails_SnipcartField type. Select any of these fields on it. All of them are nullable.
{
entries(section: "products", limit: 1) {
... on product_Entry {
productDetails {
sku
price
inventory
}
}
}
}The SKU of this product, which Snipcart uses as the item’s ID. This is null when no SKU is set.
The price of this product. This is null when no price is set.
Whether this product is shippable.
Whether this product is taxable.
The weight of this product, in the unit given by weightUnit. This is null when no weight is set.
The unit for weight, which is grams, ounces or pounds.
The length of this product, in the unit given by dimensionsUnit. This is null when no length is set.
The width of this product, in the unit given by dimensionsUnit. This is null when no width is set.
The height of this product, in the unit given by dimensionsUnit. This is null when no height is set.
The number of this product in stock. This is null when no inventory is set.
The unit for length, width and height, which is centimeters or inches.