Schema Documentation

compositeProduct

Description

A composite product object

Response

Returns a CompositeProduct

Arguments
NameDescription
id - ID The ID for identifying the CompositeProduct product
idType - ProductIdTypeEnum Type of ID being used identify product

Example

Query
query compositeProduct(  $id: ID,  $idType: ProductIdTypeEnum){  compositeProduct(    id: $id,    idType: $idType  ){    addToCartFormLocationaddons {      ...ProductAddonFieldFragment    }allPaColor {      ...ProductToPaColorConnectionFragment    }allPaSize {      ...ProductToPaSizeConnectionFragment    }attributes {      ...ProductToProductAttributeConnectionFragment    }averageRatingbackordersbackordersAllowedcatalogVisibilitycommentCountcommentStatuscomments {      ...ProductToCommentsConnectionFragment    }components {      ...CompositeProductComponentFragment    }contentcontentType {      ...ContentNodeToContentTypeConnectionEdgeFragment    }contentTypeNamedatabaseIddatedateGmtdateOnSaleFromdateOnSaleTodefaultAttributes {      ...CompositeProductToVariationAttributeConnectionFragment    }descriptiondesiredSlugeditableInCarteditingLockedBy {      ...ContentNodeToEditLockConnectionEdgeFragment    }editorBlocks {      ...ProductEditorBlockFragment    }enclosureenqueuedScripts {      ...ContentNodeToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...ContentNodeToEnqueuedStylesheetConnectionFragment    }excerptfeaturedfeaturedImage {      ...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment    }featuredImageDatabaseIdfeaturedImageIdgalleryImages {      ...ProductToMediaItemConnectionFragment    }globalAttributes {      ...ProductToGlobalProductAttributeConnectionFragment    }guidheightidimage {      ...MediaItemFragment    }isContentNodeisPreviewisRestrictedisTermNodelastEditedBy {      ...ContentNodeToEditLastConnectionEdgeFragment    }layoutlengthlinklocalAttributes {      ...ProductToLocalProductAttributeConnectionFragment    }manageStockmenuOrdermetaData {      ...MetaDataFragment    }modifiedmodifiedGmtnameonSalepreview {      ...ProductToPreviewConnectionEdgeFragment    }previewRevisionDatabaseIdpreviewRevisionIdpriceproductCategories {      ...ProductToProductCategoryConnectionFragment    }productIdproductTags {      ...ProductToProductTagConnectionFragment    }productTypes {      ...ProductToProductTypeConnectionFragment    }purchasablepurchaseNoteregularPricerelated {      ...ProductToProductConnectionFragment    }reviewCountreviews {      ...ProductToCommentConnectionFragment    }reviewsAllowedsalePricescenarios {      ...CompositeProductScenarioFragment    }seo {      ...PostTypeSEOFragment    }shippingClassIdshippingClasses {      ...ProductToShippingClassConnectionFragment    }shippingRequiredshippingTaxableshopPriceCalculationshortDescriptionskuslugsoldIndividuallysoldIndividuallyContextstatusstockQuantitystockStatustaxClasstaxStatustemplate {      ...ContentTemplateFragment    }terms {      ...ProductToTermNodeConnectionFragment    }titletotalSalestypeupsell {      ...ProductToUpsellConnectionFragment    }urivirtualCompositevisibleProducts {      ...ProductToVisibleProductConnectionFragment    }weightwidth  }}
Variables
{"id":"4","idType":"DATABASE_ID"}
Response
{"data":{"compositeProduct":{"addToCartFormLocation":"BEFORE_TABS","addons":[ProductAddonField],"allPaColor":ProductToPaColorConnection,"allPaSize":ProductToPaSizeConnection,"attributes":ProductToProductAttributeConnection,"averageRating":123.45,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"abc123","comments":ProductToCommentsConnection,"components":[CompositeProductComponent],"content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","databaseId":987,"date":"xyz789","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"xyz789","defaultAttributes":CompositeProductToVariationAttributeConnection,"description":"abc123","desiredSlug":"xyz789","editableInCart":false,"editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[ProductEditorBlock],"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"excerpt":"xyz789","featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":"4","galleryImages":ProductToMediaItemConnection,"globalAttributes":ProductToGlobalProductAttributeConnection,"guid":"abc123","height":"xyz789","id":"4","image":MediaItem,"isContentNode":true,"isPreview":false,"isRestricted":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"layout":"COMPONENTIZED","length":"abc123","link":"xyz789","localAttributes":ProductToLocalProductAttributeConnection,"manageStock":true,"menuOrder":123,"metaData":[MetaData],"modified":"abc123","modifiedGmt":"xyz789","name":"xyz789","onSale":false,"preview":ProductToPreviewConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":"4","price":"xyz789","productCategories":ProductToProductCategoryConnection,"productId":987,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":true,"purchaseNote":"xyz789","regularPrice":"abc123","related":ProductToProductConnection,"reviewCount":987,"reviews":ProductToCommentConnection,"reviewsAllowed":false,"salePrice":"xyz789","scenarios":[CompositeProductScenario],"seo":PostTypeSEO,"shippingClassId":123,"shippingClasses":ProductToShippingClassConnection,"shippingRequired":false,"shippingTaxable":true,"shopPriceCalculation":"CALCULATE_FROM_TO","shortDescription":"abc123","sku":"abc123","slug":"xyz789","soldIndividually":false,"soldIndividuallyContext":"CONFIGURATION","status":"xyz789","stockQuantity":987,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"terms":ProductToTermNodeConnection,"title":"xyz789","totalSales":987,"type":"BUNDLE","upsell":ProductToUpsellConnection,"uri":"abc123","virtualComposite":false,"visibleProducts":ProductToVisibleProductConnection,"weight":"xyz789","width":"abc123"}}}
©  2021-2023WPGraphQL WooCommerce.All rights reserved.