Skip to content
Esc
↑↓navigate↵open⌘Jpreview

v1CategoryById

Get a single category by ID

QUERYv1CategoryById
Arguments
idString!required

Category UUID. Required

localeString!required

Locale for translated category fields (e.g. en, sv). Required

Returns

Category with recursive subcategories

Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "query V1CategoryById($id: String!, $locale: String!) {\n  v1CategoryById(id: $id, locale: $locale) {\n    id\n    slug\n    name\n    description\n    seoTitle\n    seoDescription\n    parentId\n    sortOrder\n    status\n    coverUrl\n    fullName\n    fullUri\n    translatedUri {\n      locale\n      uri\n    }\n    createdAt\n    updatedAt\n    attributes {\n      id\n      key\n      name\n      description\n      templateKey\n      filterable\n      createdAt\n      updatedAt\n    }\n    subCategories {\n      id\n      slug\n      name\n      description\n      seoTitle\n      seoDescription\n      parentId\n      sortOrder\n      status\n      coverUrl\n      fullName\n      fullUri\n      createdAt\n      updatedAt\n    }\n  }\n}",
  "variables": {
    "id": "string",
    "locale": "string"
  }
}'
Response
{
  "data": {
    "v1CategoryById": {
      "id": "string",
      "slug": "string",
      "name": "string",
      "description": "string",
      "seoTitle": "string",
      "seoDescription": "string",
      "parentId": "string",
      "sortOrder": 0,
      "status": "string",
      "coverUrl": "string",
      "fullName": [
        "string"
      ],
      "fullUri": "string",
      "translatedUri": [
        {
          "locale": "string",
          "uri": "string"
        }
      ],
      "createdAt": null,
      "updatedAt": null,
      "attributes": [
        {
          "id": "string",
          "key": "string",
          "name": "string",
          "description": "string",
          "templateKey": "string",
          "filterable": true,
          "createdAt": null,
          "updatedAt": null
        }
      ],
      "subCategories": [
        {
          "id": "string",
          "slug": "string",
          "name": "string",
          "description": "string",
          "seoTitle": "string",
          "seoDescription": "string",
          "parentId": "string",
          "sortOrder": 0,
          "status": "string",
          "coverUrl": "string",
          "fullName": [
            "string"
          ],
          "fullUri": "string",
          "createdAt": null,
          "updatedAt": null
        }
      ]
    }
  }
}