Schema Documentation
variableProduct
Description
A simple product object
Response
Returns a
VariableProduct
Arguments
Name | Description |
---|---|
id -
ID | The ID for identifying the VariableProduct product |
idType -
ProductIdTypeEnum | Type of ID being used identify product |
Example
Query
query variableProduct(
$id: ID,
$idType: ProductIdTypeEnum
){
variableProduct(
id: $id,
idType: $idType
){
attributes {
...ProductToProductAttributeConnectionFragment
}averageRatingbackordersbackordersAllowedcatalogVisibilitycommentCountcommentStatuscontentcontentType {
...ContentNodeToContentTypeConnectionEdgeFragment
}contentTypeNamecrossSell {
...VariableProductToProductConnectionFragment
}databaseIddatedateGmtdateOnSaleFromdateOnSaleTodefaultAttributes {
...VariableProductToVariationAttributeConnectionFragment
}descriptiondesiredSlugeditingLockedBy {
...ContentNodeToEditLockConnectionEdgeFragment
}enclosureenqueuedScripts {
...ContentNodeToEnqueuedScriptConnectionFragment
}enqueuedStylesheets {
...ContentNodeToEnqueuedStylesheetConnectionFragment
}featuredfeaturedImage {
...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment
}featuredImageDatabaseIdfeaturedImageIdgalleryImages {
...ProductToMediaItemConnectionFragment
}globalAttributes {
...ProductToGlobalProductAttributeConnectionFragment
}guidheightidimage {
...MediaItemFragment
}isContentNodeisPreviewisRestrictedisTermNodelastEditedBy {
...ContentNodeToEditLastConnectionEdgeFragment
}lengthlinklocalAttributes {
...ProductToLocalProductAttributeConnectionFragment
}manageStockmenuOrdermetaData {
...MetaDataFragment
}modifiedmodifiedGmtnameonSaleparent {
...ProductFragment
}previewRevisionDatabaseIdpreviewRevisionIdpriceproductCategories {
...ProductToProductCategoryConnectionFragment
}productTags {
...ProductToProductTagConnectionFragment
}productTypes {
...ProductToProductTypeConnectionFragment
}purchasablepurchaseNoteregularPricerelated {
...ProductToProductConnectionFragment
}reviewCountreviews {
...ProductToCommentConnectionFragment
}reviewsAllowedsalePriceseo {
...PostTypeSEOFragment
}shippingClassIdshippingClasses {
...ProductToShippingClassConnectionFragment
}shippingRequiredshippingTaxableshortDescriptionskuslugsoldIndividuallystatusstockQuantitystockStatustaxClasstaxStatustemplate {
...ContentTemplateFragment
}totalSalestypeupsell {
...ProductToUpsellConnectionFragment
}urivariations {
...VariableProductToProductVariationConnectionFragment
}visibleProducts {
...ProductToVisibleProductConnectionFragment
}weightwidth
}
}
Variables
{"id":"4","idType":"DATABASE_ID"}
Response
{"data":{"variableProduct":{"attributes":ProductToProductAttributeConnection,"averageRating":987.65,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"abc123","content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","crossSell":VariableProductToProductConnection,"databaseId":123,"date":"abc123","dateGmt":"xyz789","dateOnSaleFrom":"abc123","dateOnSaleTo":"xyz789","defaultAttributes":VariableProductToVariationAttributeConnection,"description":"abc123","desiredSlug":"xyz789","editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":123,"featuredImageId":"4","galleryImages":ProductToMediaItemConnection,"globalAttributes":ProductToGlobalProductAttributeConnection,"guid":"xyz789","height":"xyz789","id":"4","image":MediaItem,"isContentNode":false,"isPreview":false,"isRestricted":true,"isTermNode":false,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"length":"xyz789","link":"xyz789","localAttributes":ProductToLocalProductAttributeConnection,"manageStock":false,"menuOrder":987,"metaData":[MetaData],"modified":"abc123","modifiedGmt":"xyz789","name":"xyz789","onSale":true,"parent":Product,"previewRevisionDatabaseId":987,"previewRevisionId":"4","price":"xyz789","productCategories":ProductToProductCategoryConnection,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":false,"purchaseNote":"xyz789","regularPrice":"abc123","related":ProductToProductConnection,"reviewCount":123,"reviews":ProductToCommentConnection,"reviewsAllowed":true,"salePrice":"xyz789","seo":PostTypeSEO,"shippingClassId":987,"shippingClasses":ProductToShippingClassConnection,"shippingRequired":true,"shippingTaxable":true,"shortDescription":"xyz789","sku":"xyz789","slug":"xyz789","soldIndividually":false,"status":"abc123","stockQuantity":123,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"totalSales":123,"type":"EXTERNAL","upsell":ProductToUpsellConnection,"uri":"xyz789","variations":VariableProductToProductVariationConnection,"visibleProducts":ProductToVisibleProductConnection,"weight":"xyz789","width":"abc123"}}}