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
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 @deprecated
attributes: [SelectedAttribute!]! @deprecated
channelListings: [ProductChannelListing!]
mediaById(
id: ID!
): ProductMedia
imageById(
id: ID!
): ProductImage @deprecated
variant(
id: ID
sku: String
): ProductVariant @deprecated
variants: [ProductVariant!] @deprecated
productVariants(
filter: ProductVariantFilterInput
where: ProductVariantWhereInput
sortBy: ProductVariantSortingInput
before: String
after: String
first: Int
last: Int
): ProductVariantCountableConnection
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
id ● ID!
The ID of the product.
privateMetadata ● [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield ● String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
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 ● [String!]
metadata ● [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield ● String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
metafields ● Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
assignedAttribute ● AssignedAttribute
Get a single attribute attached to product by attribute slug.
Added in Saleor 3.22slug ● String!
Slug of the attribute
assignedAttributes ● [AssignedAttribute!]!
List of attributes assigned to this product.
Added in Saleor 3.22limit ● PositiveInt
Maximum number of attributes to return. Default is 100.
seoTitle ● String
SEO title of the product.
seoDescription ● String
SEO description of the product.
name ● String!
SEO description of the product.
description ● JSONString
Description of the product.
Rich text format. For reference see https://editorjs.io/
productType ● ProductType!
Type of the product.
slug ● String!
Slug of the product.
category ● Category
created ● DateTime!
The date and time when the product was created.
updatedAt ● DateTime!
The date and time when the product was last updated.
weight ● Weight
Weight of the product.
defaultVariant ● ProductVariant
Default variant of the product.
rating ● Float
Rating of the product.
channel ● String
Channel given to retrieve this product. Also used by federation gateway to resolve this object in a federated query.
thumbnail ● Image
Thumbnail of the product.
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).
format ● ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
pricing ● ProductPricingInfo
Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
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 ● Boolean
Whether the product is in stock, set as available for purchase in the given channel, and published.
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.
channelListings ● [ProductChannelListing!]
List of availability in channels for the product.
mediaById ● ProductMedia
Get a single product media by ID.
id ● ID!
ID of a product media.
productVariants ● ProductVariantCountableConnection
List of variants for the product.
Added in Saleor 3.21filter ● ProductVariantFilterInput
Use where filter instead.
Filtering options for product variant.
where ● ProductVariantWhereInput
Where filtering options for product variants.
sortBy ● ProductVariantSortingInput
Sort products variants.
before ● String
Return the elements in the list that come before the specified cursor.
after ● String
Return the elements in the list that come after the specified cursor.
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 ● 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 ● [ProductMedia!]
List of media for the product.
sortBy ● MediaSortingInput
Sort media.
collections ● [Collection!]
List of collections for the product.
translation ● ProductTranslation
Returns translated product fields for the given language code.
languageCode ● LanguageCodeEnum!
A language code to return the translation for product.
availableForPurchaseAt ● DateTime
Date when product is available for purchase.
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
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 ● String
External ID of this product.
Show deprecated
Interfaces
Node
An object with an ID
ObjectWithMetadata
ObjectWithAttributes
An object with attributes.
Added in Saleor 3.22Returned By
product query
Member Of
AssignedMultiProductReferenceAttribute object ● AssignedSingleProductReferenceAttribute object ● 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