Product Object
Represents an individual item for sale in the storefront.
type Product implements Node & ObjectWithMetadata & ObjectWithAttributes {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
assignedAttribute(slug: String!): AssignedAttribute
assignedAttributes(limit: PositiveInt = 100): [AssignedAttribute!]!
seoTitle: String
seoDescription: String
name: String!
description: JSONString
productType: ProductType!
slug: String!
category: Category
created: DateTime!
updatedAt: DateTime!
chargeTaxes: Boolean! @deprecated(reason: "Use `Channel.taxConfiguration` field to determine whether tax collection is enabled.")
weight: Weight
defaultVariant: ProductVariant
rating: Float @deprecated(reason: "Product rating is deprecated and will be removed. Use a numeric attribute instead.")
channel: String
descriptionJson: JSONString @deprecated(reason: "Use the `description` field instead.")
thumbnail(size: Int, sizeRounding: ThumbnailSizeRoundingEnum = NEAREST, format: ThumbnailFormatEnum = ORIGINAL): Image
pricing(address: AddressInput): ProductPricingInfo
isAvailable(address: AddressInput @deprecated): Boolean
taxType: TaxType @deprecated(reason: "Use `taxClass` field instead.")
attribute(slug: String!): SelectedAttribute @deprecated(reason: "Use the `assignedAttribute` field instead.")
attributes: [SelectedAttribute!]! @deprecated(reason: "Use the `assignedAttributes` field instead.")
channelListings: [ProductChannelListing!]
mediaById(id: ID!): ProductMedia
imageById(id: ID!): ProductImage @deprecated(reason: "Use the `mediaById` field instead.")
variant(id: ID, sku: String): ProductVariant @deprecated(reason: "Use top-level `variant` query.")
variants: [ProductVariant!] @deprecated(reason: "Use `productVariants` field instead.")
productVariants(filter: ProductVariantFilterInput @deprecated(reason: "Use `where` filter instead."), where: ProductVariantWhereInput, sortBy: ProductVariantSortingInput, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection
media(sortBy: MediaSortingInput): [ProductMedia!]
images: [ProductImage!] @deprecated(reason: "Use the `media` field instead.")
collections: [Collection!]
translation(languageCode: LanguageCodeEnum!): ProductTranslation
availableForPurchase: Date @deprecated(reason: "Use the `availableForPurchaseAt` field to fetch the available for purchase date.")
availableForPurchaseAt: DateTime
isAvailableForPurchase: Boolean
taxClass: TaxClass
externalReference: String
}
Interfaces
Node, ObjectWithMetadata, ObjectWithAttributes
Fields
id
id · ID!
The ID of the product.
privateMetadata
privateMetadata · [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield
privateMetafield · String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
privateMetafields
privateMetafields · Metadata
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
metadata
metadata · [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield
metafield · String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
metafields
metafields · Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
assignedAttribute
assignedAttribute · AssignedAttribute
Get a single attribute attached to product by attribute slug.
Added in Saleor 3.22slug
slug · String!
Slug of the attribute
assignedAttributes
assignedAttributes · [AssignedAttribute!]!
List of attributes assigned to this product.
Added in Saleor 3.22limit
limit · PositiveInt
Maximum number of attributes to return. Default is 100.
Default: 100.
seoTitle
seoTitle · String
SEO title of the product.
seoDescription
seoDescription · String
SEO description of the product.
name
name · String!
SEO description of the product.
description
description · JSONString
Description of the product.
Rich text format. For reference see https://editorjs.io/
productType
productType · ProductType!
Type of the product.
slug
slug · String!
Slug of the product.
category
category · Category
created
created · DateTime!
The date and time when the product was created.
updatedAt
updatedAt · DateTime!
The date and time when the product was last updated.
chargeTaxes
chargeTaxes · Boolean!
weight
weight · Weight
Weight of the product.
defaultVariant
defaultVariant · ProductVariant
Default variant of the product.
rating
rating · Float
Rating of the product.
channel
channel · String
Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.
descriptionJson
descriptionJson · JSONString
Description of the product.
Rich text format. For reference see https://editorjs.io/
thumbnail
thumbnail · Image
Thumbnail of the product.
size
size · Int
Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). Thumbnails are generated only in the available sizes: 32, 64, 128, 256, 512, 1024, 2048, 4096; sizeRounding determines which one is used.
sizeRounding
sizeRounding · ThumbnailSizeRoundingEnum
Determines how the requested size is matched to an available thumbnail size.
Added in Saleor 3.23Default: NEAREST.
format
format · ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
Default: ORIGINAL.
pricing
pricing · ProductPricingInfo
Lists the storefront product’s pricing, the current price and discounts, only meant for displaying.
address
address · AddressInput
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.
isAvailable
isAvailable · Boolean
Whether the product is in stock, set as available for purchase in the given channel, and published.
address
address · AddressInput
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. When Shop.useLegacyShippingZoneStockAvailability is disabled, this argument is ignored — stock availability is determined by the direct warehouse-channel link instead of shipping zones.
taxType
taxType · TaxType
A type of tax. Assigned by enabled tax gateway
attribute
attribute · SelectedAttribute
Get a single attribute attached to product by attribute slug.
slug
slug · String!
Slug of the attribute
attributes
attributes · [SelectedAttribute!]!
List of attributes assigned to this product.
channelListings
channelListings · [ProductChannelListing!]
List of availability in channels for the product.
mediaById
mediaById · ProductMedia
Get a single product media by ID.
id
id · ID!
ID of a product media.
imageById
imageById · ProductImage
Get a single product image by ID.
id
id · ID!
ID of a product image.
variant
variant · ProductVariant
Get a single variant by SKU or ID.
id
id · ID
ID of the variant.
sku
sku · String
SKU of the variant.
variants
variants · [ProductVariant!]
List of variants for the product.
productVariants
productVariants · ProductVariantCountableConnection
List of variants for the product.
Added in Saleor 3.21filter
filter · ProductVariantFilterInput
Filtering options for product variant.
where
where · ProductVariantWhereInput
Where filtering options for product variants.
sortBy
sortBy · ProductVariantSortingInput
Sort products variants.
before
before · String
Return the elements in the list that come before the specified cursor.
after
after · String
Return the elements in the list that come after the specified cursor.
first
first · Int
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
last
last · Int
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
media
media · [ProductMedia!]
List of media for the product.
sortBy
sortBy · MediaSortingInput
Sort media.
images
images · [ProductImage!]
List of images for the product.
collections
collections · [Collection!]
List of collections for the product.
translation
translation · ProductTranslation
Returns translated product fields for the given language code.
languageCode
languageCode · LanguageCodeEnum!
A language code to return the translation for product.
availableForPurchase
availableForPurchase · Date
Date when product is available for purchase.
availableForPurchaseAt
availableForPurchaseAt · DateTime
Date when product is available for purchase.
isAvailableForPurchase
isAvailableForPurchase · Boolean
Refers to a state that can be set by admins to control whether a product is available for purchase in storefronts. This does not guarantee the availability of stock. When set to False, this product is still visible to customers, but it cannot be purchased.
taxClass
taxClass · TaxClass
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.
externalReference
externalReference · String
External ID of this product.
Used by
- AssignedMultiProductReferenceAttribute (objects)
- AssignedSingleProductReferenceAttribute (objects)
- GiftCard (objects)
- _Entity (unions)
- ProductBulkResult (objects)
- ProductChannelListingUpdate (objects)
- ProductCountableEdge (objects)
- ProductCreate (objects)
- ProductCreated (objects)
- ProductDelete (objects)
- ProductDeleted (objects)
- ProductMediaCreate (objects)
- ProductMediaDelete (objects)
- ProductMediaReorder (objects)
- ProductMediaUpdate (objects)
- ProductMetadataUpdated (objects)
- ProductReorderAttributeValues (objects)
- ProductTranslatableContent (objects)
- ProductTranslate (objects)
- ProductUpdate (objects)
- ProductUpdated (objects)
- ProductVariant (objects)
- ProductVariantReorder (objects)
- ProductVariantSetDefault (objects)
- product (queries)
Schema: Saleor 3.23.43. Download SDL.