Schema Documentation

variableProduct

Description

A variable product object

Response

Returns a VariableProduct

Arguments
NameDescription
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  ){    addons {      ...ProductAddonFieldFragment    }allPaColor {      ...ProductToPaColorConnectionFragment    }allPaSize {      ...ProductToPaSizeConnectionFragment    }attributes {      ...ProductToProductAttributeConnectionFragment    }averageRatingbackordersbackordersAllowedcatalogVisibilitycommentCountcommentStatuscomments {      ...ProductToCommentsConnectionFragment    }contentcontentType {      ...ContentNodeToContentTypeConnectionEdgeFragment    }contentTypeNamecrossSell {      ...VariableProductToProductConnectionFragment    }databaseIddatedateGmtdateOnSaleFromdateOnSaleTodefaultAttributes {      ...VariableProductToVariationAttributeConnectionFragment    }descriptiondesiredSlugeditingLockedBy {      ...ContentNodeToEditLockConnectionEdgeFragment    }editorBlocks {      ...ProductEditorBlockFragment    }enclosureenqueuedScripts {      ...ContentNodeToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...ContentNodeToEnqueuedStylesheetConnectionFragment    }excerptfeaturedfeaturedImage {      ...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment    }featuredImageDatabaseIdfeaturedImageIdgalleryImages {      ...ProductToMediaItemConnectionFragment    }globalAttributes {      ...ProductToGlobalProductAttributeConnectionFragment    }guidheightidimage {      ...MediaItemFragment    }isContentNodeisPreviewisRestrictedisTermNodelastEditedBy {      ...ContentNodeToEditLastConnectionEdgeFragment    }lengthlinklocalAttributes {      ...ProductToLocalProductAttributeConnectionFragment    }manageStockmenuOrdermetaData {      ...MetaDataFragment    }modifiedmodifiedGmtnameonSalepreview {      ...ProductToPreviewConnectionEdgeFragment    }previewRevisionDatabaseIdpreviewRevisionIdpriceproductCategories {      ...ProductToProductCategoryConnectionFragment    }productIdproductTags {      ...ProductToProductTagConnectionFragment    }productTypes {      ...ProductToProductTypeConnectionFragment    }purchasablepurchaseNoteregularPricerelated {      ...ProductToProductConnectionFragment    }reviewCountreviews {      ...ProductToCommentConnectionFragment    }reviewsAllowedsalePriceseo {      ...PostTypeSEOFragment    }shippingClassIdshippingClasses {      ...ProductToShippingClassConnectionFragment    }shippingRequiredshippingTaxableshortDescriptionskuslugsoldIndividuallystatusstockQuantitystockStatustaxClasstaxStatustemplate {      ...ContentTemplateFragment    }terms {      ...ProductToTermNodeConnectionFragment    }titletotalSalestypeupsell {      ...ProductToUpsellConnectionFragment    }urivariations {      ...VariableProductToProductVariationConnectionFragment    }visibleProducts {      ...ProductToVisibleProductConnectionFragment    }weightwidth  }}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"variableProduct":{"addons":[ProductAddonField],"allPaColor":ProductToPaColorConnection,"allPaSize":ProductToPaSizeConnection,"attributes":ProductToProductAttributeConnection,"averageRating":123.45,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"xyz789","comments":ProductToCommentsConnection,"content":"xyz789","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","crossSell":VariableProductToProductConnection,"databaseId":987,"date":"xyz789","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"xyz789","defaultAttributes":VariableProductToVariationAttributeConnection,"description":"xyz789","desiredSlug":"xyz789","editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[ProductEditorBlock],"enclosure":"xyz789","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"excerpt":"xyz789","featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":123,"featuredImageId":"4","galleryImages":ProductToMediaItemConnection,"globalAttributes":ProductToGlobalProductAttributeConnection,"guid":"xyz789","height":"xyz789","id":4,"image":MediaItem,"isContentNode":true,"isPreview":true,"isRestricted":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"length":"xyz789","link":"xyz789","localAttributes":ProductToLocalProductAttributeConnection,"manageStock":true,"menuOrder":987,"metaData":[MetaData],"modified":"abc123","modifiedGmt":"xyz789","name":"xyz789","onSale":false,"preview":ProductToPreviewConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":"4","price":"xyz789","productCategories":ProductToProductCategoryConnection,"productId":123,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":false,"purchaseNote":"abc123","regularPrice":"xyz789","related":ProductToProductConnection,"reviewCount":987,"reviews":ProductToCommentConnection,"reviewsAllowed":false,"salePrice":"xyz789","seo":PostTypeSEO,"shippingClassId":123,"shippingClasses":ProductToShippingClassConnection,"shippingRequired":true,"shippingTaxable":false,"shortDescription":"abc123","sku":"abc123","slug":"abc123","soldIndividually":true,"status":"abc123","stockQuantity":123,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"terms":ProductToTermNodeConnection,"title":"xyz789","totalSales":987,"type":"BUNDLE","upsell":ProductToUpsellConnection,"uri":"abc123","variations":VariableProductToProductVariationConnection,"visibleProducts":ProductToVisibleProductConnection,"weight":"xyz789","width":"abc123"}}}