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
The ID of the product.
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
Product.privateMetafield.key
●String!
non-null scalar
Product.privateMetafields
● Metadata
scalar
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
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
Product.metafield.key
●String!
non-null scalar
Product.metafields
● Metadata
scalar
Public metadata. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
Product.metafields.keys
●[String!]
list scalar
Product.seoTitle
● String
scalar
SEO title of the product.
Product.seoDescription
● String
scalar
SEO description of the product.
Product.name
● String!
non-null scalar
SEO description of the product.
Product.description
● JSONString
scalar
Description of the product.
Rich text format. For reference see https://editorjs.io/
Product.productType
● ProductType!
non-null object
Type of the product.
Product.slug
● String!
non-null scalar
Slug of the product.
Product.category
● Category
object
Product.created
● DateTime!
non-null scalar
The date and time when the product was created.
Product.updatedAt
● DateTime!
non-null scalar
The date and time when the product was last updated.
Product.chargeTaxes
● Boolean!
deprecated non-null scalar
DEPRECATEDThis field will be removed in Saleor 4.0. Use
Channel.taxConfiguration
field to determine whether tax collection is enabled.
Product.weight
● Weight
object
Weight of the product.
Product.defaultVariant
● ProductVariant
object
Default variant of the product.
Product.rating
● Float
scalar
Rating of the product.
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
deprecated scalar
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
description
field instead.Description of the product.
Rich text format. For reference see https://editorjs.io/
Product.thumbnail
● Image
object
Thumbnail of the product.
Product.thumbnail.size
●Int
scalarDesired 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
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
Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
Product.pricing.address
●AddressInput
inputDestination address used to find warehouses where stock availability for this product is checked. If address is empty, uses
Shop.companyAddress
or fallbacks to server'ssettings.DEFAULT_COUNTRY
configuration.
Product.isAvailable
● Boolean
scalar
Whether the product is in stock, set as available for purchase in the given channel, and published.
Product.isAvailable.address
●AddressInput
inputDestination address used to find warehouses where stock availability for this product is checked. If address is empty, uses
Shop.companyAddress
or fallbacks to server'ssettings.DEFAULT_COUNTRY
configuration.
Product.taxType
● TaxType
deprecated object
DEPRECATEDThis field will be removed in Saleor 4.0. Use
taxClass
field instead.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 scalarSlug 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.
Product.mediaById
● ProductMedia
object
Get a single product media by ID.
Product.mediaById.id
●ID
scalarID of a product media.
Product.imageById
● ProductImage
deprecated object
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
mediaById
field instead.Get a single product image by ID.
Product.imageById.id
●ID
scalarID of a product image.
Product.variant
● ProductVariant
deprecated object
DEPRECATEDThis field will be removed in Saleor 4.0. Use top-level
variant
query.Get a single variant by SKU or ID.
Added in Saleor 3.9
Product.variant.id
●ID
scalarID of the variant.
Product.variant.sku
● String
scalar
SKU of the variant.
Product.variants
● [ProductVariant!]
list object
List of variants for the product.
Product.media
● [ProductMedia!]
list object
List of media for the product.
Product.media.sortBy
●MediaSortingInput
inputSort media.
Added in Saleor 3.9
Product.images
● [ProductImage!]
deprecated list object
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
media
field instead.List of images for the product.
Product.collections
● [Collection!]
list object
List of collections for the product.
Product.translation
● ProductTranslation
object
Returns translated product fields for the given language code.
Product.translation.languageCode
●LanguageCodeEnum!
non-null enumA language code to return the translation for product.
Product.availableForPurchase
● Date
deprecated scalar
DEPRECATEDThis field will be removed in Saleor 4.0. Use the
availableForPurchaseAt
field to fetch the available for purchase date.Date when product is available for purchase.
Product.availableForPurchaseAt
● DateTime
scalar
Date when product is available for purchase.
Product.isAvailableForPurchase
● Boolean
scalar
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
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.
Product.externalReference
● String
scalar
External ID of this product.
Added in Saleor 3.10
Interfaces
Node
interface
An object with an ID
ObjectWithMetadata
interface
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