Schema Documentation

category

Description

A 0bject

Response

Returns a Category

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

Example

Query
query category(  $id: ID!,  $idType: CategoryIdType){  category(    id: $id,    idType: $idType  ){    ancestors {      ...CategoryToAncestorsCategoryConnectionFragment    }categoryIdchildren {      ...CategoryToCategoryConnectionFragment    }contentNodes {      ...CategoryToContentNodeConnectionFragment    }countdatabaseIddescriptionenqueuedScripts {      ...TermNodeToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...TermNodeToEnqueuedStylesheetConnectionFragment    }idisContentNodeisRestrictedisTermNodelinknameparent {      ...CategoryToParentCategoryConnectionEdgeFragment    }parentDatabaseIdparentIdposts {      ...CategoryToPostConnectionFragment    }seo {      ...TaxonomySEOFragment    }slugtaxonomy {      ...CategoryToTaxonomyConnectionEdgeFragment    }taxonomyNametermGroupIdtermTaxonomyIduri  }}
Variables
{"id":"4","idType":"DATABASE_ID"}
Response
{"data":{"category":{"ancestors":CategoryToAncestorsCategoryConnection,"categoryId":123,"children":CategoryToCategoryConnection,"contentNodes":CategoryToContentNodeConnection,"count":123,"databaseId":987,"description":"abc123","enqueuedScripts":TermNodeToEnqueuedScriptConnection,"enqueuedStylesheets":TermNodeToEnqueuedStylesheetConnection,"id":"4","isContentNode":false,"isRestricted":false,"isTermNode":false,"link":"abc123","name":"abc123","parent":CategoryToParentCategoryConnectionEdge,"parentDatabaseId":987,"parentId":"4","posts":CategoryToPostConnection,"seo":TaxonomySEO,"slug":"abc123","taxonomy":CategoryToTaxonomyConnectionEdge,"taxonomyName":"xyz789","termGroupId":123,"termTaxonomyId":987,"uri":"xyz789"}}}