Skip to main content
Version: 3.x

Product

Represents an individual item for sale in the storefront.

type Product implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
seoTitle: String
seoDescription: String
name: String!
description: JSONString
productType: ProductType!
slug: String!
category: Category
created: DateTime!
updatedAt: DateTime!
chargeTaxes: Boolean!
weight: Weight
defaultVariant: ProductVariant
rating: Float
channel: String
descriptionJson: JSONString
thumbnail(size: Int, format: ThumbnailFormatEnum): Image
pricing(address: AddressInput): ProductPricingInfo
isAvailable(address: AddressInput): Boolean
taxType: TaxType
attribute(slug: String!): SelectedAttribute
attributes: [SelectedAttribute!]!
channelListings: [ProductChannelListing!]
mediaById(id: ID): ProductMedia
imageById(id: ID): ProductImage
variant(id: ID, sku: String): ProductVariant
variants: [ProductVariant!]
media(sortBy: MediaSortingInput): [ProductMedia!]
images: [ProductImage!]
collections: [Collection!]
translation(languageCode: LanguageCodeEnum!): ProductTranslation
availableForPurchase: Date
availableForPurchaseAt: DateTime
isAvailableForPurchase: Boolean
taxClass: TaxClass
}

Fields

Product.id ● ID! non-null scalar

Product.privateMetadata ● [MetadataItem!]! non-null object

List of private metadata items. Requires staff permissions to access.

Product.privateMetafield ● String scalar

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Product.privateMetafield.key ● String! non-null scalar

Product.privateMetafields ● Metadata scalar

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Product.privateMetafields.keys ● [String!] list scalar

Product.metadata ● [MetadataItem!]! non-null object

List of public metadata items. Can be accessed without permissions.

Product.metafield ● String scalar

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Product.metafield.key ● String! non-null scalar

Product.metafields ● Metadata scalar

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Product.metafields.keys ● [String!] list scalar

Product.seoTitle ● String scalar

Product.seoDescription ● String scalar

Product.name ● String! non-null scalar

Product.description ● JSONString scalar

Description of the product.

Rich text format. For reference see https://editorjs.io/

Product.productType ● ProductType! non-null object

Product.slug ● String! non-null scalar

Product.category ● Category object

Product.created ● DateTime! non-null scalar

Product.updatedAt ● DateTime! non-null scalar

Product.chargeTaxes ● Boolean! non-null scalar

Product.weight ● Weight object

Product.defaultVariant ● ProductVariant object

Product.rating ● Float scalar

Product.channel ● String scalar

Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.

Product.descriptionJson ● JSONString scalar

Description of the product.

Rich text format. For reference see https://editorjs.io/

Product.thumbnail ● Image object

Product.thumbnail.size ● Int scalar

Size of the image. If not provided, the original image will be returned.

Product.thumbnail.format ● ThumbnailFormatEnum enum

The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned.

Added in Saleor 3.6.

Note: this API is currently in Feature Preview and can be subject to changes at later point.

Product.pricing ● ProductPricingInfo object

Lists the storefront product's pricing, the current price and discounts, only meant for displaying.

Product.pricing.address ● AddressInput input

Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses Shop.companyAddress or fallbacks to server's settings.DEFAULT_COUNTRY configuration.

Product.isAvailable ● Boolean scalar

Whether the product is in stock and visible or not.

Product.isAvailable.address ● AddressInput input

Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses Shop.companyAddress or fallbacks to server's settings.DEFAULT_COUNTRY configuration.

Product.taxType ● TaxType object

A type of tax. Assigned by enabled tax gateway

Product.attribute ● SelectedAttribute object

Get a single attribute attached to product by attribute slug.

Added in Saleor 3.9.

Product.attribute.slug ● String! non-null scalar

Slug of the attribute

Product.attributes ● [SelectedAttribute!]! non-null object

List of attributes assigned to this product.

Product.channelListings ● [ProductChannelListing!] list object

List of availability in channels for the product.

Requires one of the following permissions: MANAGE_PRODUCTS.

Product.mediaById ● ProductMedia object

Get a single product media by ID.

Product.mediaById.id ● ID scalar

ID of a product media.

Product.imageById ● ProductImage object

Get a single product image by ID.

Product.imageById.id ● ID scalar

ID of a product image.

Product.variant ● ProductVariant object

Get a single variant by SKU or ID.

Added in Saleor 3.9.

Product.variant.id ● ID scalar

ID of the variant.

Product.variant.sku ● String scalar

SKU of the variant.

Product.variants ● [ProductVariant!] list object

List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.

Product.media ● [ProductMedia!] list object

List of media for the product.

Product.media.sortBy ● MediaSortingInput input

Sort media.

Added in Saleor 3.9.

Product.images ● [ProductImage!] list object

List of images for the product.

Product.collections ● [Collection!] list object

List of collections for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.

Product.translation ● ProductTranslation object

Returns translated product fields for the given language code.

Product.translation.languageCode ● LanguageCodeEnum! non-null enum

A language code to return the translation for product.

Product.availableForPurchase ● Date scalar

Date when product is available for purchase.

Product.availableForPurchaseAt ● DateTime scalar

Date when product is available for purchase.

Product.isAvailableForPurchase ● Boolean scalar

Whether the product is available for purchase.

Product.taxClass ● TaxClass object

Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the Product type.

Requires one of the following permissions: AUTHENTICATED_STAFF_USER.

Interfaces

Node interface

An object with an ID

ObjectWithMetadata interface

Returned by

product query

Member of

GiftCard object ● ProductChannelListingUpdate object ● ProductCountableEdge object ● ProductCreate object ● ProductCreated object ● ProductDelete object ● ProductDeleted object ● ProductMediaCreate object ● ProductMediaDelete object ● ProductMediaReorder object ● ProductMediaUpdate object ● ProductMetadataUpdated object ● ProductReorderAttributeValues object ● ProductTranslatableContent object ● ProductTranslate object ● ProductUpdate object ● ProductUpdated object ● ProductVariant object ● ProductVariantReorder object ● ProductVariantSetDefault object

Implemented by

_Entity union