Schema Documentation
product
Description
A product object
Response
Returns a Product
Arguments
Name | Description |
---|---|
id - ID! | The ID for identifying the product |
idType - ProductIdTypeEnum | Type of ID being used identify product |
Example
Query
query product( $id: ID!, $idType: ProductIdTypeEnum){ product( id: $id, idType: $idType ){ productIdaddons { ...ProductAddonFieldFragment }allPaColor { ...ProductToPaColorConnectionFragment }allPaSize { ...ProductToPaSizeConnectionFragment }attributes { ...ProductToProductAttributeConnectionFragment }averageRatingcatalogVisibilitycommentCountcommentStatuscomments { ...ProductToCommentsConnectionFragment }contentcontentType { ...ContentNodeToContentTypeConnectionEdgeFragment }contentTypeNamedatabaseIddatedateGmtdateOnSaleFromdateOnSaleTodescriptiondesiredSlugeditingLockedBy { ...ContentNodeToEditLockConnectionEdgeFragment }editorBlocks { ...ProductEditorBlockFragment }enclosureenqueuedScripts { ...ContentNodeToEnqueuedScriptConnectionFragment }enqueuedStylesheets { ...ContentNodeToEnqueuedStylesheetConnectionFragment }excerptfeaturedfeaturedImage { ...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment }featuredImageDatabaseIdfeaturedImageIdgalleryImages { ...ProductToMediaItemConnectionFragment }globalAttributes { ...ProductToGlobalProductAttributeConnectionFragment }guididimage { ...MediaItemFragment }isContentNodeisPreviewisRestrictedisTermNodelastEditedBy { ...ContentNodeToEditLastConnectionEdgeFragment }linklocalAttributes { ...ProductToLocalProductAttributeConnectionFragment }menuOrdermetaData { ...MetaDataFragment }modifiedmodifiedGmtnameonSalepreview { ...ProductToPreviewConnectionEdgeFragment }previewRevisionDatabaseIdpreviewRevisionIdproductCategories { ...ProductToProductCategoryConnectionFragment }productTags { ...ProductToProductTagConnectionFragment }productTypes { ...ProductToProductTypeConnectionFragment }purchasablepurchaseNoterelated { ...ProductToProductUnionConnectionFragment }reviewCountreviews { ...ProductToCommentConnectionFragment }reviewsAllowedseo { ...PostTypeSEOFragment }shippingClasses { ...ProductToShippingClassConnectionFragment }shortDescriptionskuslugstatustemplate { ...ContentTemplateFragment }terms { ...ProductToTermNodeConnectionFragment }titletotalSalestypeupsell { ...ProductToUpsellConnectionFragment }urivisibleProducts { ...ProductToVisibleProductConnectionFragment } }}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"product":{"productId":123,"addons":[ProductAddonField],"allPaColor":ProductToPaColorConnection,"allPaSize":ProductToPaSizeConnection,"attributes":ProductToProductAttributeConnection,"averageRating":987.65,"catalogVisibility":"CATALOG","commentCount":123,"commentStatus":"abc123","comments":ProductToCommentsConnection,"content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":123,"date":"abc123","dateGmt":"xyz789","dateOnSaleFrom":"xyz789","dateOnSaleTo":"abc123","description":"abc123","desiredSlug":"abc123","editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[ProductEditorBlock],"enclosure":"xyz789","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"excerpt":"abc123","featured":true,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":"4","galleryImages":ProductToMediaItemConnection,"globalAttributes":ProductToGlobalProductAttributeConnection,"guid":"xyz789","id":4,"image":MediaItem,"isContentNode":true,"isPreview":false,"isRestricted":true,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"abc123","localAttributes":ProductToLocalProductAttributeConnection,"menuOrder":987,"metaData":[MetaData],"modified":"xyz789","modifiedGmt":"abc123","name":"xyz789","onSale":false,"preview":ProductToPreviewConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":4,"productCategories":ProductToProductCategoryConnection,"productTags":ProductToProductTagConnection,"productTypes":ProductToProductTypeConnection,"purchasable":true,"purchaseNote":"xyz789","related":ProductToProductUnionConnection,"reviewCount":987,"reviews":ProductToCommentConnection,"reviewsAllowed":false,"seo":PostTypeSEO,"shippingClasses":ProductToShippingClassConnection,"shortDescription":"abc123","sku":"abc123","slug":"xyz789","status":"xyz789","template":ContentTemplate,"terms":ProductToTermNodeConnection,"title":"abc123","totalSales":123,"type":"BUNDLE","upsell":ProductToUpsellConnection,"uri":"abc123","visibleProducts":ProductToVisibleProductConnection}}}