Query
query QueryCategoriesByItemId($itemId: ID!) {
QueryCategoriesByItemId(itemId: $itemId) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
cursor
node {
id
parentId
sortNumber
name
}
}
nodes {
id
parentId
sortNumber
name
}
totalCount
}
}Variables
{
"itemId": "id"
}Response
{
"data": {
"QueryCategoriesByItemId": {
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string",
"endCursor": "string"
},
"edges": [
{
"cursor": "string",
"node": {
"id": "id",
"parentId": "id",
"sortNumber": 1,
"name": "string"
}
}
],
"nodes": [
{
"id": "id",
"parentId": "id",
"sortNumber": 1,
"name": "string"
}
],
"totalCount": 1
}
}
}Queries
QueryCategoriesByItemId
Queries the categories an item is directly assigned to. Parent categories are only included if the item is assigned to them as well. Inactive categories are included. An item without categories returns an empty list; an unknown item is rejected as not found. The categories are ordered by their ID.
QUERY
QueryCategoriesByItemId(itemId: ID!, first: Int, after: String, last: Int, before: String): QueryCategoriesByItemIdConnectionArguments
itemId
ID!
required
first
Int
Returns the first n elements from the list.
after
String
Returns the elements in the list that come after the specified cursor.
last
Int
Returns the last n elements from the list.
before
String
Returns the elements in the list that come before the specified cursor.
pageInfo
Information to aid in pagination.
edges
A list of edges.
nodes
A flattened list of the nodes.
totalCount
Int!
Identifies the total count of items in the connection.
Query
query QueryCategoriesByItemId($itemId: ID!) {
QueryCategoriesByItemId(itemId: $itemId) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
cursor
node {
id
parentId
sortNumber
name
}
}
nodes {
id
parentId
sortNumber
name
}
totalCount
}
}Variables
{
"itemId": "id"
}Response
{
"data": {
"QueryCategoriesByItemId": {
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string",
"endCursor": "string"
},
"edges": [
{
"cursor": "string",
"node": {
"id": "id",
"parentId": "id",
"sortNumber": 1,
"name": "string"
}
}
],
"nodes": [
{
"id": "id",
"parentId": "id",
"sortNumber": 1,
"name": "string"
}
],
"totalCount": 1
}
}
}Was this page helpful?