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! @deprecated
weight: Weight
defaultVariant: ProductVariant
rating: Float
channel: String
descriptionJson: JSONString @deprecated
thumbnail(size: Int, format: ThumbnailFormatEnum = ORIGINAL): Image
pricing(address: AddressInput): ProductPricingInfo
isAvailable(address: AddressInput): Boolean
taxType: TaxType @deprecated
attribute(slug: String!): SelectedAttribute
attributes: [SelectedAttribute!]!
channelListings: [ProductChannelListing!]
mediaById(id: ID): ProductMedia
imageById(id: ID): ProductImage @deprecated
variant(id: ID, sku: String): ProductVariant @deprecated
variants: [ProductVariant!]
media(sortBy: MediaSortingInput): [ProductMedia!]
images: [ProductImage!] @deprecated
collections: [Collection!]
translation(languageCode: LanguageCodeEnum!): ProductTranslation
availableForPurchase: Date @deprecated
availableForPurchaseAt: DateTime
isAvailableForPurchase: Boolean
taxClass: TaxClass
externalReference: String
}
Fields
Product.id ● ID! non-null scalar miscellaneous
The ID of the product.
Product.privateMetadata ● [MetadataItem!]! non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
Product.privateMetafield ● String scalar miscellaneous
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
Product.privateMetafield.key●String!non-null scalar miscellaneous
Product.privateMetafields ● Metadata scalar miscellaneous
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.3keysto control which fields you want to include. The default is to include everything.
Product.privateMetafields.keys●[String!]list scalar miscellaneous
Product.metadata ● [MetadataItem!]! non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
Product.metafield ● String scalar miscellaneous
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
Product.metafield.key●String!non-null scalar miscellaneous
Product.metafields ● Metadata scalar miscellaneous
Public metadata. Use
Added in Saleor 3.3keysto control which fields you want to include. The default is to include everything.
Product.metafields.keys●[String!]list scalar miscellaneous
Product.seoTitle ● String scalar miscellaneous
SEO title of the product.
Product.seoDescription ● String scalar miscellaneous
SEO description of the product.
Product.name ● String! non-null scalar miscellaneous
SEO description of the product.
Product.description ● JSONString scalar miscellaneous
Description of the product.
Rich text format. For reference see https://editorjs.io/
Product.productType ● ProductType! non-null object products
Type of the product.
Product.slug ● String! non-null scalar miscellaneous
Slug of the product.
Product.category ● Category object products
Product.created ● DateTime! non-null scalar miscellaneous
The date and time when the product was created.
Product.updatedAt ● DateTime! non-null scalar miscellaneous
The date and time when the product was last updated.
Product.chargeTaxes ● Boolean! deprecated non-null scalar miscellaneous
DEPRECATEDThis field will be removed in Saleor 4.0. Use
Channel.taxConfigurationfield to determine whether tax collection is enabled.
Product.weight ● Weight object miscellaneous
Weight of the product.
Product.defaultVariant ● ProductVariant object products
Default variant of the product.
Product.rating ● Float scalar miscellaneous
Rating of the product.
Product.channel ● String scalar miscellaneous
Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.
Product.descriptionJson ● JSONString deprecated scalar miscellaneous
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
descriptionfield instead.Description of the product.
Rich text format. For reference see https://editorjs.io/
Product.thumbnail ● Image object miscellaneous
Thumbnail of the product.
Product.thumbnail.size●Intscalar miscellaneousDesired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
Product.thumbnail.format ● ThumbnailFormatEnum enum miscellaneous
The format of the image. When not provided, format of the original image will be used.
Added in Saleor 3.6
Product.pricing ● ProductPricingInfo object products
Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
Product.pricing.address●AddressInputinput miscellaneousDestination address used to find warehouses where stock availability for this product is checked. If address is empty, uses
Shop.companyAddressor fallbacks to server'ssettings.DEFAULT_COUNTRYconfiguration.
Product.isAvailable ● Boolean scalar miscellaneous
Whether the product is in stock, set as available for purchase in the given channel, and published.
Product.isAvailable.address●AddressInputinput miscellaneousDestination address used to find warehouses where stock availability for this product is checked. If address is empty, uses
Shop.companyAddressor fallbacks to server'ssettings.DEFAULT_COUNTRYconfiguration.
Product.taxType ● TaxType deprecated object taxes
DEPRECATEDThis field will be removed in Saleor 4.0. Use
taxClassfield instead.A type of tax. Assigned by enabled tax gateway
Product.attribute ● SelectedAttribute object attributes
Get a single attribute attached to product by attribute slug.
Added in Saleor 3.9
Product.attribute.slug●String!non-null scalar miscellaneousSlug of the attribute
Product.attributes ● [SelectedAttribute!]! non-null object attributes
List of attributes assigned to this product.
Product.channelListings ● [ProductChannelListing!] list object products
List of availability in channels for the product.
Product.mediaById ● ProductMedia object products
Get a single product media by ID.
Product.mediaById.id●IDscalar miscellaneousID of a product media.
Product.imageById ● ProductImage deprecated object products
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
mediaByIdfield instead.Get a single product image by ID.
Product.imageById.id●IDscalar miscellaneousID of a product image.
Product.variant ● ProductVariant deprecated object products
DEPRECATEDThis field will be removed in Saleor 4.0. Use top-level
variantquery.Get a single variant by SKU or ID.
Added in Saleor 3.9
Product.variant.id●IDscalar miscellaneousID of the variant.
Product.variant.sku ● String scalar miscellaneous
SKU of the variant.
Product.variants ● [ProductVariant!] list object products
List of variants for the product.
Product.media ● [ProductMedia!] list object products
List of media for the product.
Product.media.sortBy●MediaSortingInputinput productsSort media.
Added in Saleor 3.9
Product.images ● [ProductImage!] deprecated list object products
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
mediafield instead.List of images for the product.
Product.collections ● [Collection!] list object products
List of collections for the product.
Product.translation ● ProductTranslation object products
Returns translated product fields for the given language code.
Product.translation.languageCode●LanguageCodeEnum!non-null enum miscellaneousA language code to return the translation for product.
Product.availableForPurchase ● Date deprecated scalar miscellaneous
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
availableForPurchaseAtfield to fetch the available for purchase date.Date when product is available for purchase.
Product.availableForPurchaseAt ● DateTime scalar miscellaneous
Date when product is available for purchase.
Product.isAvailableForPurchase ● Boolean scalar miscellaneous
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.
Product.taxClass ● TaxClass object taxes
Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the
Producttype.
Product.externalReference ● String scalar miscellaneous
External ID of this product.
Added in Saleor 3.10
Interfaces
Node interface miscellaneous
An object with an ID
ObjectWithMetadata interface miscellaneous
Returned By
product query
Member Of
GiftCard object ● ProductBulkResult 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