Schema Documentation
termNode
Description
A node in a taxonomy used to group and relate content nodes
Response
Returns a
TermNode
Arguments
Name | Description |
---|---|
id -
ID! | Unique identifier for the term node. |
idType -
TermNodeIdTypeEnum | Type of unique identifier to fetch a term node by. Default is Global ID |
taxonomy -
TaxonomyEnum | The taxonomy of the tern node. Required when idType is set to "name" or "slug" |
Example
Query
query termNode(
$id: ID!,
$idType: TermNodeIdTypeEnum,$taxonomy: TaxonomyEnum
){
termNode(
id: $id,
idType: $idType,
taxonomy: $taxonomy
){
countdatabaseIddescriptionenqueuedScripts {
...TermNodeToEnqueuedScriptConnectionFragment
}enqueuedStylesheets {
...TermNodeToEnqueuedStylesheetConnectionFragment
}idisContentNodeisRestrictedisTermNodelinknameslugtaxonomyNametermGroupIdtermTaxonomyIduri
}
}
Variables
{"id":"4","idType":"DATABASE_ID","taxonomy":"CATEGORY"}
Response
{"data":{"termNode":{"count":123,"databaseId":123,"description":"abc123","enqueuedScripts":TermNodeToEnqueuedScriptConnection,"enqueuedStylesheets":TermNodeToEnqueuedStylesheetConnection,"id":"4","isContentNode":true,"isRestricted":false,"isTermNode":true,"link":"xyz789","name":"xyz789","slug":"xyz789","taxonomyName":"abc123","termGroupId":987,"termTaxonomyId":987,"uri":"xyz789"}}}