Schema Documentation
CompositeProduct
Description
A composite product object
Fields
Field Name | Description |
---|---|
addToCartFormLocation - CompositeProductFormLocationEnum | Controls the form location of the product in the single-product page. Applicable to composite-type products. |
addons - [ProductAddonField] | Product addons connected to this product. |
allPaColor - ProductToPaColorConnection | Connection between the Product type and the paColor type |
Arguments
| |
allPaSize - ProductToPaSizeConnection | Connection between the Product type and the paSize type |
Arguments
| |
attributes - ProductToProductAttributeConnection | Connection between the Product type and the ProductAttribute type |
Arguments
| |
averageRating - Float | Product average count |
backorders - BackordersEnum | Product backorders status |
backordersAllowed - Boolean | Can product be backordered? |
catalogVisibility - CatalogVisibilityEnum | Catalog visibility |
commentCount - Int | The number of comments. Even though WPGraphQL denotes this field as an integer, in WordPress this field should be saved as a numeric string for compatibility. |
commentStatus - String | Whether the comments are open or closed for this particular post. |
comments - ProductToCommentsConnection | Connection between the Product type and the Comment type |
Arguments
| |
components - [CompositeProductComponent] | List of components that this product consists of. Applicable to composite-type products. |
content - String | The content of the post. |
Arguments
| |
contentType - ContentNodeToContentTypeConnectionEdge | Connection between the ContentNode type and the ContentType type |
contentTypeName - String! | The name of the Content Type the node belongs to |
databaseId - Int! | Product or variation ID |
date - String | Post publishing date. |
dateGmt - String | The publishing date set in GMT. |
dateOnSaleFrom - String | Date on sale from |
dateOnSaleTo - String | Date on sale to |
defaultAttributes - ProductWithAttributesToVariationAttributeConnection | Connection between the ProductWithAttributes type and the VariationAttribute type |
Arguments
| |
description - String | Product description |
Arguments
| |
desiredSlug - String | The desired slug of the post |
editableInCart - Boolean | Controls whether the configuration of this product can be modified from the cart page. Applicable to composite-type products. |
editingLockedBy - ContentNodeToEditLockConnectionEdge | If a user has edited the node within the past 15 seconds, this will return the user that last edited. Null if the edit lock doesn't exist or is greater than 15 seconds |
editorBlocks - [ProductEditorBlock] | List of product editor blocks |
Arguments
| |
enclosure - String | The RSS enclosure for the object |
enqueuedScripts - ContentNodeToEnqueuedScriptConnection | Connection between the ContentNode type and the EnqueuedScript type |
Arguments
| |
enqueuedStylesheets - ContentNodeToEnqueuedStylesheetConnection | Connection between the ContentNode type and the EnqueuedStylesheet type |
Arguments
| |
excerpt - String | The excerpt of the post. |
Arguments
| |
featured - Boolean | If the product is featured |
featuredImage - NodeWithFeaturedImageToMediaItemConnectionEdge | Connection between the NodeWithFeaturedImage type and the MediaItem type |
featuredImageDatabaseId - Int | The database identifier for the featured image node assigned to the content node |
featuredImageId - ID | Globally unique ID of the featured image assigned to the node |
galleryImages - ProductToMediaItemConnection | Connection between the Product type and the MediaItem type |
Arguments
| |
globalAttributes - ProductToGlobalProductAttributeConnection | Connection between the Product type and the GlobalProductAttribute type |
Arguments
| |
guid - String | The global unique identifier for this post. This currently matches the value stored in WP_Post->guid and the guid column in the "post_objects" database table. |
height - String | Product's height |
id - ID! | Product or variation global ID |
image - MediaItem | Main image |
isContentNode - Boolean! | Whether the node is a Content Node |
isPreview - Boolean | Whether the object is a node in the preview state |
isRestricted - Boolean | Whether the object is restricted from the current viewer |
isTermNode - Boolean! | Whether the node is a Term |
lastEditedBy - ContentNodeToEditLastConnectionEdge | The user that most recently edited the node |
layout - CompositeProductLayoutEnum | Single-product template layout. Applicable to composite-type products. |
length - String | Product's length |
link - String | The permalink of the post |
localAttributes - ProductToLocalProductAttributeConnection | Connection between the Product type and the LocalProductAttribute type |
Arguments
| |
lowStockAmount - Int | Low stock amount |
manageStock - ManageStockEnum | If product manage stock |
menuOrder - Int | Menu order |
metaData - [MetaData] | Object meta data |
modified - String | The local modified time for a post. If a post was recently updated the modified field will change to match the corresponding time. |
modifiedGmt - String | The GMT modified time for a post. If a post was recently updated the modified field will change to match the corresponding time in GMT. |
name - String | Product name |
onSale - Boolean | Is product on sale? |
preview - ProductToPreviewConnectionEdge | Connection between the Product type and the Product type |
Arguments
| |
previewRevisionDatabaseId - Int | The database id of the preview node |
previewRevisionId - ID | Whether the object is a node in the preview state |
price - String | Product's active price |
Arguments
| |
productCategories - ProductToProductCategoryConnection | Connection between the Product type and the productCategory type |
Arguments
| |
productId - Int! | The id field matches the WP_Post->ID field. Deprecated in favor of the databaseId field |
productTags - ProductToProductTagConnection | Connection between the Product type and the productTag type |
Arguments
| |
productTypes - ProductToProductTypeConnection | Connection between the Product type and the productType type |
Arguments
| |
purchasable - Boolean | Can product be purchased? |
purchaseNote - String | Purchase note |
regularPrice - String | Product's regular price |
Arguments
| |
related - ProductToProductUnionConnection | Connection between the Product type and the ProductUnion type |
Arguments
| |
reviewCount - Int | Product review count |
reviews - ProductToCommentConnection | Connection between the Product type and the Comment type |
Arguments
| |
reviewsAllowed - Boolean | If reviews are allowed |
salePrice - String | Product's sale price |
Arguments
| |
scenarios - [CompositeProductScenario] | Scenarios data. Applicable to composite-type products. |
seo - PostTypeSEO | The Yoast SEO data of the ContentNode |
shippingClassId - Int | shipping class ID |
shippingClasses - ProductToShippingClassConnection | Connection between the Product type and the shippingClass type |
Arguments
| |
shippingRequired - Boolean | Does product need to be shipped? |
shippingTaxable - Boolean | Is product shipping taxable? |
shopPriceCalculation - CompositeProductShopPriceCalcOptions | Composite catalog price calculation. Applicable to composite-type products. |
shortDescription - String | Product short description |
Arguments
| |
sku - String | Product SKU |
slug - String | Product slug |
soldIndividually - Boolean | If should be sold individually |
soldIndividuallyContext - CompositeProductSoldIndividuallyContextEnum | Sold Individually option context. Applicable to composite-type products. |
status - String | The current status of the object |
stockQuantity - Int | Number of items available for sale |
stockStatus - StockStatusEnum | Product stock status |
taxClass - TaxClassEnum | Tax class |
taxStatus - TaxStatusEnum | Tax status |
template - ContentTemplate | The template assigned to the node |
terms - ProductToTermNodeConnection | Connection between the Product type and the TermNode type |
Arguments
| |
title - String | The title of the post. This is currently just the raw title. An amendment to support rendered title needs to be made. |
Arguments
| |
totalSales - Int | Number total of sales |
type - ProductTypesEnum | Product type |
upsell - ProductToUpsellConnection | Connection between the Product type and the ProductUnion type |
Arguments
| |
uri - String | The unique resource identifier path |
virtualComposite - Boolean | Forces all contents of this composite to be treated as virtual. |
visibleProducts - ProductToVisibleProductConnection | Connection between the Product type and the visibleProduct type |
Arguments
| |
weight - String | Product's weight |
width - String | Product's width |
Example
{"addToCartFormLocation":"BEFORE_TABS","addons":[ProductAddonField],"allPaColor":ProductToPaColorConnection,"allPaSize":ProductToPaSizeConnection,"attributes":ProductToProductAttributeConnection,"averageRating":987.65,"backorders":"NO","backordersAllowed":false,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"abc123","comments":ProductToCommentsConnection,"components":[CompositeProductComponent],"content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","databaseId":123,"date":"abc123","dateGmt":"xyz789","dateOnSaleFrom":"abc123","dateOnSaleTo":"xyz789","defaultAttributes":ProductWithAttributesToVariationAttributeConnection,"description":"abc123","desiredSlug":"xyz789","editableInCart":false,"editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[ProductEditorBlock],"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"excerpt":"abc123","featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":123,"featuredImageId":"4","galleryImages":ProductToMediaItemConnection,"globalAttributes":ProductToGlobalProductAttributeConnection,"guid":"abc123","height":"abc123","id":"4","image":MediaItem,"isContentNode":false,"isPreview":false,"isRestricted":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"layout":"COMPONENTIZED","length":"abc123","link":"abc123","localAttributes":ProductToLocalProductAttributeConnection,"lowStockAmount":123,"manageStock":"FALSE","menuOrder":987,"metaData":[MetaData],"modified":"xyz789","modifiedGmt":"xyz789","name":"abc123","onSale":true,"preview":ProductToPreviewConnectionEdge,"previewRevisionDatabaseId":987,"previewRevisionId":"4","price":"xyz789","productCategories":ProductToProductCategoryConnection,"productId":123,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":true,"purchaseNote":"abc123","regularPrice":"xyz789","related":ProductToProductUnionConnection,"reviewCount":123,"reviews":ProductToCommentConnection,"reviewsAllowed":false,"salePrice":"abc123","scenarios":[CompositeProductScenario],"seo":PostTypeSEO,"shippingClassId":123,"shippingClasses":ProductToShippingClassConnection,"shippingRequired":true,"shippingTaxable":false,"shopPriceCalculation":"CALCULATE_FROM_TO","shortDescription":"xyz789","sku":"abc123","slug":"abc123","soldIndividually":false,"soldIndividuallyContext":"CONFIGURATION","status":"abc123","stockQuantity":987,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"terms":ProductToTermNodeConnection,"title":"xyz789","totalSales":123,"type":"BUNDLE","upsell":ProductToUpsellConnection,"uri":"xyz789","virtualComposite":false,"visibleProducts":ProductToVisibleProductConnection,"weight":"abc123","width":"xyz789"}