v1CategoryByFullUri
Get a single category by full URI path
v1CategoryByFullUriquery
Arguments
fullUriString!requiredCategory path segments joined by slash (e.g. parent/child). Required
localeString!requiredLocale for translated category fields (e.g. en, sv). Required
Returns
Category with recursive subcategories
Query Reference
query V1CategoryByFullUri($fullUri: String!, $locale: String!) { v1CategoryByFullUri(fullUri: $fullUri, locale: $locale) { id slug name description seoTitle seoDescription parentId sortOrder status coverUrl fullName fullUri translatedUri { locale uri } createdAt updatedAt attributes { id key name description templateKey filterable createdAt updatedAt } subCategories { id slug name description seoTitle seoDescription parentId sortOrder status coverUrl fullName fullUri createdAt updatedAt } }}{
"fullUri": "string",
"locale": "string"
}type CategoryWithTree {
id: String!
slug: String!
name: String!
description: String!
seoTitle: String!
seoDescription: String!
parentId: String
sortOrder: Int
status: String
coverUrl: String
fullName: [String!]
fullUri: String
translatedUri: [TranslatedUri!]!
createdAt: DateTime
updatedAt: DateTime
attributes: [Attribute!]!
subCategories: [CategoryWithTree!]!
}
type TranslatedUri {
locale: String!
uri: String!
}
scalar DateTime
type Attribute {
id: String!
key: String!
name: String!
description: String
values: [AttributeValue!]
templateKey: String!
filterable: Boolean!
createdAt: DateTime
updatedAt: DateTime
}Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
-H 'Content-Type: application/json' \
-d '{
"query": "query V1CategoryByFullUri($fullUri: String!, $locale: String!) {\n v1CategoryByFullUri(fullUri: $fullUri, 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": {
"fullUri": "string",
"locale": "string"
}
}'const response = await fetch("https://graphql.enad.io/{app_id}/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{\n \"query\": \"query V1CategoryByFullUri($fullUri: String!, $locale: String!) {\\n v1CategoryByFullUri(fullUri: $fullUri, 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}\",\n \"variables\": {\n \"fullUri\": \"string\",\n \"locale\": \"string\"\n }\n}"
});import requests
response = requests.post(
"https://graphql.enad.io/{app_id}/graphql",
headers={
"Content-Type": "application/json"
},
data="{\n \"query\": \"query V1CategoryByFullUri($fullUri: String!, $locale: String!) {\\n v1CategoryByFullUri(fullUri: $fullUri, 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}\",\n \"variables\": {\n \"fullUri\": \"string\",\n \"locale\": \"string\"\n }\n}",
)Response
{
"data": {
"v1CategoryByFullUri": {
"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
}
]
}
}
}