Skip to main content

product

Look up a product by ID.

Requires one of the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS
product(
id: ID
slug: String
externalReference: String
channel: String
): Product

Arguments

product.id ● ID scalar miscellaneous

ID of the product.

product.slug ● String scalar miscellaneous

Slug of the product.

product.externalReference ● String scalar miscellaneous

External ID of the product.

Added in Saleor 3.10

product.channel ● String scalar miscellaneous

Slug of a channel for which the data should be returned.

Type

Product object products

Represents an individual item for sale in the storefront.

Examples

Get a product by ID

Get a product by ID

The following query retrieves the product with the associated ID. It returns the product fields specified in the query.

Query arguments
id: ID!The ID of the product to return
channel: StringSlug of a channel for which the data should be returned.
Query
{
product(id: "UHJvZHVjdDoxOTg=", channel: "default-channel") {
id
name
}
}
Response
{
"data": {
"product": {
"id": "UHJvZHVjdDoxOTg=",
"name": "ABBA Again"
}
},
"extensions": {
"cost": {
"requestedQueryCost": 1,
"maximumAvailable": 50000
}
}
}