Schema Documentation

VariableProduct

Description

A variable product object

Fields
Field NameDescription
attributes - ProductToProductAttributeConnection Connection between the Product type and the ProductAttribute type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToProductAttributeConnectionWhereArgs

Arguments for filtering the connection

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.
content - String The content of the post.
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

contentType - ContentNodeToContentTypeConnectionEdge Connection between the ContentNode type and the ContentType type
contentTypeName - String! The name of the Content Type the node belongs to
crossSell - VariableProductToProductConnection Connection between the VariableProduct type and the Product type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - VariableProductToProductConnectionWhereArgs

Arguments for filtering the connection

databaseId - Int! The ID of the product in the database
date - String Date product created
dateGmt - String The publishing date set in GMT.
dateOnSaleFrom - String Date on sale from
dateOnSaleTo - String Date on sale to
defaultAttributes - VariableProductToVariationAttributeConnection Connection between the VariableProduct type and the VariationAttribute type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

description - String Product description
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

desiredSlug - String The desired slug of the post
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
enclosure - String The RSS enclosure for the object
enqueuedScripts - ContentNodeToEnqueuedScriptConnection Connection between the ContentNode type and the EnqueuedScript type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

enqueuedStylesheets - ContentNodeToEnqueuedStylesheetConnection Connection between the ContentNode type and the EnqueuedStylesheet type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

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
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToMediaItemConnectionWhereArgs

Arguments for filtering the connection

globalAttributes - ProductToGlobalProductAttributeConnection Connection between the Product type and the GlobalProductAttribute type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToGlobalProductAttributeConnectionWhereArgs

Arguments for filtering the connection

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! The globally unique identifier for the product
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
length - String Product's length
link - String The permalink of the post
localAttributes - ProductToLocalProductAttributeConnection Connection between the Product type and the LocalProductAttribute type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToLocalProductAttributeConnectionWhereArgs

Arguments for filtering the connection

manageStock - Boolean If product manage stock
menuOrder - Int Menu order
metaData - [MetaData] Object meta data
Arguments
key - String

Retrieve meta by key

keysIn - [String]

Retrieve multiple metas by key

multiple - Boolean

Retrieve meta with matching keys

modified - String Date product last updated
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?
parent - Product Parent product
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
format - PricingFieldFormatEnum

Format of the price

productCategories - ProductToProductCategoryConnection Connection between the Product type and the productCategory type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToProductCategoryConnectionWhereArgs

Arguments for filtering the connection

productTags - ProductToProductTagConnection Connection between the Product type and the productTag type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToProductTagConnectionWhereArgs

Arguments for filtering the connection

productTypes - ProductToProductTypeConnection Connection between the Product type and the productType type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToProductTypeConnectionWhereArgs

Arguments for filtering the connection

purchasable - Boolean Can product be purchased?
purchaseNote - String Purchase note
regularPrice - String Product's regular price
Arguments
format - PricingFieldFormatEnum

Format of the price

related - ProductToProductConnection Connection between the Product type and the Product type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToProductConnectionWhereArgs

Arguments for filtering the connection

reviewCount - Int Product review count
reviews - ProductToCommentConnection Connection between the Product type and the Comment type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToCommentConnectionWhereArgs

Arguments for filtering the connection

reviewsAllowed - Boolean If reviews are allowed
salePrice - String Product's sale price
Arguments
format - PricingFieldFormatEnum

Format of the price

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
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToShippingClassConnectionWhereArgs

Arguments for filtering the connection

shippingRequired - Boolean Does product need to be shipped?
shippingTaxable - Boolean Is product shipping taxable?
shortDescription - String Product short description
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

sku - String Product SKU
slug - String Product slug
soldIndividually - Boolean If should be sold individually
status - String Product status
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 a node of content
totalSales - Int Number total of sales
type - ProductTypesEnum Product type
upsell - ProductToUpsellConnection Connection between the Product type and the Product type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToUpsellConnectionWhereArgs

Arguments for filtering the connection

uri - String The unique resource identifier path
variations - VariableProductToProductVariationConnection Connection between the VariableProduct type and the ProductVariation type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - VariableProductToProductVariationConnectionWhereArgs

Arguments for filtering the connection

visibleProducts - ProductToVisibleProductConnection Connection between the Product type and the visibleProduct type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - ProductToVisibleProductConnectionWhereArgs

Arguments for filtering the connection

weight - String Product's weight
width - String Product's width
Example
{"attributes":ProductToProductAttributeConnection,"averageRating":123.45,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"abc123","content":"xyz789","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","crossSell":VariableProductToProductConnection,"databaseId":123,"date":"xyz789","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"abc123","defaultAttributes":VariableProductToVariationAttributeConnection,"description":"abc123","desiredSlug":"xyz789","editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"xyz789","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"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,"length":"abc123","link":"xyz789","localAttributes":ProductToLocalProductAttributeConnection,"manageStock":true,"menuOrder":123,"metaData":[MetaData],"modified":"xyz789","modifiedGmt":"abc123","name":"abc123","onSale":false,"parent":Product,"previewRevisionDatabaseId":123,"previewRevisionId":4,"price":"xyz789","productCategories":ProductToProductCategoryConnection,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":true,"purchaseNote":"abc123","regularPrice":"xyz789","related":ProductToProductConnection,"reviewCount":123,"reviews":ProductToCommentConnection,"reviewsAllowed":false,"salePrice":"xyz789","seo":PostTypeSEO,"shippingClassId":987,"shippingClasses":ProductToShippingClassConnection,"shippingRequired":false,"shippingTaxable":false,"shortDescription":"xyz789","sku":"abc123","slug":"xyz789","soldIndividually":true,"status":"xyz789","stockQuantity":123,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"totalSales":987,"type":"EXTERNAL","upsell":ProductToUpsellConnection,"uri":"abc123","variations":VariableProductToProductVariationConnection,"visibleProducts":ProductToVisibleProductConnection,"weight":"abc123","width":"xyz789"}