Home > @vsf-enterprise/commercetools-api > getCategoryDefaultQuery

# getCategoryDefaultQuery variable

Default GraphQL query for the getCategory API endpoint

Signature:

getCategoryDefaultQuery = "\n  fragment Children on Category {\n    id\n    slug(acceptLanguage: $acceptLanguage)\n    name(acceptLanguage: $acceptLanguage)\n    childCount\n  }\n  fragment DefaultCategory on Category {\n    id\n    slug(acceptLanguage: $acceptLanguage)\n    name(acceptLanguage: $acceptLanguage)\n    childCount\n    children {\n      ...Children\n      children {\n        ...Children\n        children {\n          ...Children\n        }\n      }\n    }\n  }\n  \n  query categories($where: String, $sort: [String!], $limit: Int, $offset: Int, $acceptLanguage: [Locale!]) {\n    categories(where: $where, sort: $sort, limit: $limit, offset: $offset) {\n      offset\n      count\n      total\n      results {\n        id\n        slug(acceptLanguage: $acceptLanguage)\n        name(acceptLanguage: $acceptLanguage)\n        description(acceptLanguage: $acceptLanguage)\n        childCount\n        parent {\n          ...DefaultCategory\n          parent {\n            ...DefaultCategory\n            parent {\n              ...DefaultCategory\n            }\n          }\n        }\n        children {\n          ...DefaultCategory\n        }\n      }\n    }\n  }\n"