product Query
Look up a product by ID.
product(id: ID, slug: String, slugLanguageCode: LanguageCodeEnum, externalReference: String, channel: String): Product
Returns
Show return type
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
}Arguments
id
id · ID
ID of the product.
slug
slug · String
Slug of the product.
slugLanguageCode
slugLanguageCode · LanguageCodeEnum
Language code of the product slug, omit to use primary slug.
Added in Saleor 3.21externalReference
externalReference · String
External ID of the product.
channel
channel · String
Slug of a channel for which the data should be returned.
Schema: Saleor 3.23.43. Download SDL.