Product
Describes a product.
Type Definition
type Product {
handle: String
minQuantity: Int
maxQuantity: Int
seoDescription: String
seoTitle: String
seoKeywords: String
id: Int
combinedListing: CombinedListing
firstAvailableVariant: ProductVariant
hasOnlyDefaultVariant: Boolean
variants: [ProductVariant]
options: [String]
optionsWithValues: [ProductOption]
optionsByHandle: [ProductOption]
defaultOrSelectedVariant: ProductVariant
tags: [String]
customFields: [CustomField]
inPreview: Boolean
isAvailable: Boolean
isDirectlyBuyable: Boolean
title: String
manufacturer: Manufacturer
shortDescription: String
description: String
compatible: [Product]
similar: [Product]
related: [Product]
deliverer: Deliverer
productGroups: [ProductGroup]
returnPolicyTimeLimit: Int
rating: Float
reviewCount: Int
maxRating: Int
reviews: [Review]
attachments: [Attachment]
reviewsAreEnabled: Boolean
reviewsRequireAccount: Boolean
reviewsRequirePurchase: Boolean
reviewsRequireApproval: Boolean
taxonomy: ProductTaxonomy
createdAt: String
updatedAt: String
rate: String
inCustomersWishlist: String
customerHasReviewed: String
customerCanReview: String
customerHasPurchased: String
}Fields
Relationships
- combinedListing: Links to a
CombinedListingobject representing combined product listings. - firstAvailableVariant, defaultOrSelectedVariant, variants: Connect to one or more
ProductVariantobjects representing product variants. - optionsWithValues, optionsByHandle: Arrays of
ProductOptionobjects providing detailed option data. - manufacturer: Links to a
Manufacturerobject providing manufacturer details. - compatible, similar, related: Arrays of related
Productobjects indicating compatibility, similarity, or relatedness. - deliverer: Links to a
Delivererobject representing the product’s deliverer. - productGroups: Array of
ProductGroupobjects representing associated product categories or groups. - reviews: Array of
Reviewobjects containing product reviews. - attachments: Array of
Attachmentobjects representing product attachments. - taxonomy: Links to a
ProductTaxonomyobject representing product classification.
Usage Examples
Basic Query
{
product(id: 12345) {
id
title
handle
isAvailable
minQuantity
maxQuantity
}
}Field Selection
{
product(id: 12345) {
title
description
seoTitle
seoDescription
seoKeywords
tags
rating
reviewCount
}
}Nested Queries
{
product(id: 12345) {
title
manufacturer {
id
name
}
firstAvailableVariant {
id
sku
price
}
reviews {
id
rating
comment
createdAt
}
productGroups {
id
title
}
}
}Filtering and Sorting
{
products(filter: { tags: ["summer", "sale"] }, sort: { field: "rating", direction: DESC }, first: 10) {
edges {
node {
id
title
rating
reviewCount
}
}
}
}Implements
This type does not explicitly implement any interfaces.
Connections
variantsreturns a list ofProductVariantobjects representing the different variants of the product.reviewsreturns a list ofReviewobjects associated with the product.productGroupsreturns a list ofProductGroupobjects categorizing the product.compatible,similar, andrelatedreturn lists ofProductobjects representing relationships to other products.
Related Types
CombinedListingProductVariantProductOptionCustomFieldManufacturerProductDelivererProductGroupReviewAttachmentProductTaxonomy
Best Practices
- Use the
idfield to uniquely identify products in queries and mutations. - When querying variants, prefer
firstAvailableVariantordefaultOrSelectedVariantto efficiently retrieve a single relevant variant. - Use filtering and sorting on fields like
tags,rating, andreviewCountto optimize product listings. - Leverage nested queries to fetch related data such as manufacturer details, reviews, and product groups in a single request.
- Use
isAvailableandisDirectlyBuyableto determine product purchase eligibility before displaying purchase options. - Utilize SEO-related fields (
seoTitle,seoDescription,seoKeywords) to enhance search engine optimization. - Check review-related flags (
reviewsAreEnabled,reviewsRequireAccount, etc.) to conditionally display review UI elements. - Use
customFieldsto access additional product metadata for advanced customization.
Notes
- All fields are optional and may return
nullif data is unavailable. - The API currently requires no authentication, but this may change in future versions.
- When querying lists such as
variantsorreviews, consider implementing pagination to manage large datasets efficiently. - The
createdAtandupdatedAtfields are ISO 8601 formatted strings representing timestamps. - Fields such as
inCustomersWishlist,customerHasReviewed,customerCanReview, andcustomerHasPurchasedreturn string values indicating boolean states; handle accordingly in your client. - Performance can be improved by selecting only the fields you need, especially when querying nested relationships.
- Use caching strategies on frequently accessed fields like
id,title, andratingto reduce server load.
For more information on related object types, refer to their respective documentation sections.