Schema Documentation
productVariation
Description
A product variation object
Response
Returns a ProductVariation
Arguments
Name | Description |
---|---|
id - ID | The ID for identifying the product variation |
idType - ProductVariationIdTypeEnum | Type of ID being used identify product variation |
Example
Query
query productVariation( $id: ID, $idType: ProductVariationIdTypeEnum){ productVariation( id: $id, idType: $idType ){ attributes { ...ProductVariationToVariationAttributeConnectionFragment }averageRatingbackordersbackordersAllowedcatalogVisibilitycontentType { ...ContentNodeToContentTypeConnectionEdgeFragment }contentTypeNamedatabaseIddatedateGmtdateOnSaleFromdateOnSaleTodescriptiondesiredSlugdownloadExpirydownloadLimitdownloadabledownloads { ...ProductDownloadFragment }editingLockedBy { ...ContentNodeToEditLockConnectionEdgeFragment }enclosureenqueuedScripts { ...ContentNodeToEnqueuedScriptConnectionFragment }enqueuedStylesheets { ...ContentNodeToEnqueuedStylesheetConnectionFragment }featuredfeaturedImage { ...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment }featuredImageDatabaseIdfeaturedImageIdguidhasAttributesheightidimage { ...MediaItemFragment }isContentNodeisPreviewisRestrictedisTermNodelastEditedBy { ...ContentNodeToEditLastConnectionEdgeFragment }lengthlinklowStockAmountmanageStockmenuOrdermetaData { ...MetaDataFragment }modifiedmodifiedGmtnameonSaleparent { ...ProductVariationToVariableProductConnectionEdgeFragment }previewRevisionDatabaseIdpreviewRevisionIdpricepurchasablepurchaseNoteregularPricereviewCountreviewsAllowedsalePriceseo { ...PostTypeSEOFragment }shippingClassshippingClassIdshippingRequiredshippingTaxableshortDescriptionskuslugsoldIndividuallystatusstockQuantitystockStatustaxClasstaxStatustemplate { ...ContentTemplateFragment }totalSalestypeurivirtualweightwidth }}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"productVariation":{"attributes":ProductVariationToVariationAttributeConnection,"averageRating":123.45,"backorders":"NO","backordersAllowed":true,"catalogVisibility":"CATALOG","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":123,"date":"xyz789","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"abc123","description":"abc123","desiredSlug":"abc123","downloadExpiry":987,"downloadLimit":123,"downloadable":true,"downloads":[ProductDownload],"editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":123,"featuredImageId":4,"guid":"abc123","hasAttributes":true,"height":"abc123","id":"4","image":MediaItem,"isContentNode":true,"isPreview":false,"isRestricted":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"length":"abc123","link":"abc123","lowStockAmount":987,"manageStock":"FALSE","menuOrder":987,"metaData":[MetaData],"modified":"abc123","modifiedGmt":"abc123","name":"abc123","onSale":false,"parent":ProductVariationToVariableProductConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":"4","price":"abc123","purchasable":false,"purchaseNote":"abc123","regularPrice":"abc123","reviewCount":987,"reviewsAllowed":false,"salePrice":"abc123","seo":PostTypeSEO,"shippingClass":"xyz789","shippingClassId":987,"shippingRequired":false,"shippingTaxable":false,"shortDescription":"abc123","sku":"abc123","slug":"xyz789","soldIndividually":false,"status":"xyz789","stockQuantity":987,"stockStatus":"IN_STOCK","taxClass":"INHERIT_CART","taxStatus":"NONE","template":ContentTemplate,"totalSales":123,"type":"BUNDLE","uri":"xyz789","virtual":false,"weight":"xyz789","width":"xyz789"}}}