Schema Documentation

productCategory

Description

A 0bject

Response

Returns a ProductCategory

Arguments
NameDescription
id - ID! The globally unique identifier of the object.
idType - ProductCategoryIdType Type of unique identifier to fetch by. Default is Global ID

Example

Query
query productCategory(  $id: ID!,  $idType: ProductCategoryIdType){  productCategory(    id: $id,    idType: $idType  ){    ancestors {      ...ProductCategoryToAncestorsProductCategoryConnectionFragment    }children {      ...ProductCategoryToProductCategoryConnectionFragment    }contentNodes {      ...ProductCategoryToContentNodeConnectionFragment    }countdatabaseIddescriptiondisplayenqueuedScripts {      ...TermNodeToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...TermNodeToEnqueuedStylesheetConnectionFragment    }idimage {      ...MediaItemFragment    }isContentNodeisRestrictedisTermNodelinkmenuOrdernameparent {      ...ProductCategoryToParentProductCategoryConnectionEdgeFragment    }parentDatabaseIdparentIdproductAddons {      ...ProductCategoryToProductAddonConnectionFragment    }productCategoryIdproducts {      ...ProductCategoryToProductConnectionFragment    }seo {      ...TaxonomySEOFragment    }slugtaxonomy {      ...ProductCategoryToTaxonomyConnectionEdgeFragment    }taxonomyNametermGroupIdtermTaxonomyIduri  }}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"productCategory":{"ancestors":ProductCategoryToAncestorsProductCategoryConnection,"children":ProductCategoryToProductCategoryConnection,"contentNodes":ProductCategoryToContentNodeConnection,"count":987,"databaseId":123,"description":"xyz789","display":"BOTH","enqueuedScripts":TermNodeToEnqueuedScriptConnection,"enqueuedStylesheets":TermNodeToEnqueuedStylesheetConnection,"id":4,"image":MediaItem,"isContentNode":false,"isRestricted":false,"isTermNode":false,"link":"xyz789","menuOrder":987,"name":"xyz789","parent":ProductCategoryToParentProductCategoryConnectionEdge,"parentDatabaseId":123,"parentId":4,"productAddons":ProductCategoryToProductAddonConnection,"productCategoryId":123,"products":ProductCategoryToProductConnection,"seo":TaxonomySEO,"slug":"abc123","taxonomy":ProductCategoryToTaxonomyConnectionEdge,"taxonomyName":"xyz789","termGroupId":987,"termTaxonomyId":123,"uri":"xyz789"}}}
©  2021-2023WPGraphQL WooCommerce.All rights reserved.