Schema Documentation
category
Description
A 0bject
Response
Returns a
Category
Arguments
Name | Description |
---|---|
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":123,"description":"abc123","enqueuedScripts":TermNodeToEnqueuedScriptConnection,"enqueuedStylesheets":TermNodeToEnqueuedStylesheetConnection,"id":"4","isContentNode":true,"isRestricted":false,"isTermNode":false,"link":"abc123","name":"abc123","parent":CategoryToParentCategoryConnectionEdge,"parentDatabaseId":123,"parentId":4,"posts":CategoryToPostConnection,"seo":TaxonomySEO,"slug":"abc123","taxonomy":CategoryToTaxonomyConnectionEdge,"taxonomyName":"xyz789","termGroupId":987,"termTaxonomyId":987,"uri":"abc123"}}}