Product Object
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!] @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
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.
Product.privateMetafield.key
● String!
non-null scalar miscellaneous
Product.privateMetafields
● Metadata
scalar miscellaneous
Private metadata. Requires staff permissions to access. Use keys
to 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.
Product.metafield.key
● String!
non-null scalar miscellaneous
Product.metafields
● Metadata
scalar miscellaneous
Public metadata. Use keys
to 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
Use Channel.taxConfiguration
field 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
Use the description
field 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
● Int
scalar miscellaneous
Desired 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.
Product.pricing
● ProductPricingInfo
object products
Lists the storefront product's pricing, the current price and discounts, only meant for displaying.
Product.pricing.address
● AddressInput
input miscellaneous
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 miscellaneous
Whether the product is in stock, set as available for purchase in the given channel, and published.
Product.isAvailable.address
● AddressInput
input miscellaneous
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
deprecated object taxes
Use taxClass
field 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.
Product.attribute.slug
● String!
non-null scalar miscellaneous
Slug 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
● ID
scalar miscellaneous
ID of a product media.
Product.imageById
● ProductImage
deprecated object products
Use the mediaById
field instead.
Get a single product image by ID.
Product.imageById.id
● ID
scalar miscellaneous
ID of a product image.
Product.variant
● ProductVariant
deprecated object products
Use top-level variant
query.
Get a single variant by SKU or ID.
Product.variant.id
● ID
scalar miscellaneous
ID of the variant.
Product.variant.sku
● String
scalar miscellaneous
SKU of the variant.
Product.variants
● [ProductVariant!]
deprecated list object products
Use productVariants
field instead.
List of variants for the product.
Product.productVariants
● ProductVariantCountableConnection
object products
List of variants for the product.
Added in Saleor 3.21Product.productVariants.filter
● ProductVariantFilterInput
input products
Filtering options for product variant.
Product.productVariants.where
● ProductVariantWhereInput
input products
Where filtering options.
Product.productVariants.sortBy
● ProductVariantSortingInput
input products
Sort products variants.
Product.productVariants.before
● String
scalar miscellaneous
Return the elements in the list that come before the specified cursor.
Product.productVariants.after
● String
scalar miscellaneous
Return the elements in the list that come after the specified cursor.
Product.productVariants.first
● Int
scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
Product.productVariants.last
● Int
scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
Product.media
● [ProductMedia!]
list object products
List of media for the product.
Product.media.sortBy
● MediaSortingInput
input products
Sort media.
Product.images
● [ProductImage!]
deprecated list object products
Use the media
field 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 miscellaneous
A language code to return the translation for product.
Product.availableForPurchase
● Date
deprecated scalar miscellaneous
Use the availableForPurchaseAt
field 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 Product
type.
Product.externalReference
● String
scalar miscellaneous
External ID of this product.
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