Schema Documentation

ProductVariation

Description

A product variation.

Fields
Field NameDescription
attributes - ProductVariationToVariationAttributeConnection Connection between the ProductVariation 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

averageRating - Float Product average count
backorders - BackordersEnum Product variation backorders
backordersAllowed - Boolean Can product be backordered?
catalogVisibility - CatalogVisibilityEnum Product variation catalog visibility
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 Date variation created
dateGmt - String The publishing date set in GMT.
dateOnSaleFrom - String Date on sale from
dateOnSaleTo - String Date on sale to
description - String Product description
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

desiredSlug - String The desired slug of the post
downloadExpiry - Int Download expiry
downloadLimit - Int Download limit
downloadable - Boolean Is downloadable?
downloads - [ProductDownload] Product downloads
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
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.
hasAttributes - Boolean Does product variation have any visible attributes
height - String Product variation height
id - ID! Product or variation global ID
image - MediaItem Product variation 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 variation length
link - String The permalink of the post
lowStockAmount - Int Low stock amount
manageStock - ManageStockEnum if/how product variation stock is managed
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 variation 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 variation on sale?
parent - ProductVariationToVariableProductConnectionEdge The parent of the node. The parent object can be of various types
previewRevisionDatabaseId - Int The database id of the preview node
previewRevisionId - ID Whether the object is a node in the preview state
price - String Product variation's active price
Arguments
format - PricingFieldFormatEnum

Format of the price

purchasable - Boolean If product variation can be bought
purchaseNote - String Product variation purchase_note
regularPrice - String Product variation's regular price
Arguments
format - PricingFieldFormatEnum

Format of the price

reviewCount - Int Product review count
reviewsAllowed - Boolean If reviews are allowed
salePrice - String Product variation's sale price
Arguments
format - PricingFieldFormatEnum

Format of the price

seo - PostTypeSEO The Yoast SEO data of the ContentNode
shippingClass - String Product variation shipping class
shippingClassId - Int shipping class ID
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 variation SKU (Stock-keeping unit)
slug - String Product slug
soldIndividually - Boolean If should be sold individually
status - String Variation status
stockQuantity - Int Product variation stock quantity
stockStatus - StockStatusEnum Product stock status
taxClass - TaxClassEnum Product variation 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
uri - String The unique resource identifier path
virtual - Boolean Is product virtual?
weight - String Product variation weight
width - String Product variation width
Possible Types
ProductVariation Types

SimpleProductVariation

SubscriptionProductVariation

Example
{"attributes":ProductVariationToVariationAttributeConnection,"averageRating":987.65,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","databaseId":123,"date":"xyz789","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"abc123","description":"abc123","desiredSlug":"xyz789","downloadExpiry":987,"downloadLimit":987,"downloadable":false,"downloads":[ProductDownload],"editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featured":false,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":4,"guid":"xyz789","hasAttributes":true,"height":"xyz789","id":"4","image":MediaItem,"isContentNode":false,"isPreview":true,"isRestricted":true,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"length":"xyz789","link":"abc123","lowStockAmount":987,"manageStock":"FALSE","menuOrder":123,"metaData":[MetaData],"modified":"xyz789","modifiedGmt":"abc123","name":"abc123","onSale":false,"parent":ProductVariationToVariableProductConnectionEdge,"previewRevisionDatabaseId":987,"previewRevisionId":"4","price":"abc123","purchasable":false,"purchaseNote":"abc123","regularPrice":"xyz789","reviewCount":123,"reviewsAllowed":false,"salePrice":"xyz789","seo":PostTypeSEO,"shippingClass":"xyz789","shippingClassId":987,"shippingRequired":false,"shippingTaxable":false,"shortDescription":"abc123","sku":"xyz789","slug":"xyz789","soldIndividually":true,"status":"abc123","stockQuantity":123,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"totalSales":987,"type":"BUNDLE","uri":"abc123","virtual":false,"weight":"xyz789","width":"xyz789"}