Hi there, I've seen some resolved issues about it, but I couldn't find my way with my context
- I have a single type "Home", where I can have a "category" field (relationship to my "Category" content type)
{
"id": "home",
"label": "Home",
"repeatable": false,
"status": true,
"json": {
"Main": {
"title": {
"type": "Text",
"config": {
"label": "Title*",
"placeholder": ""
}
},
"slices": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"category_slider": {
"type": "SharedSlice"
}
}
}
}
}
}
}
Here is the model of the slice:
{
"id": "category_slider",
"type": "SharedSlice",
"name": "CategoryCarousel",
"description": "Text",
"variations": [
{
"id": "default",
"name": "Default",
"docURL": "...",
"version": "sktwi1xtmkfgx8626",
"description": "Text",
"primary": {
"title": {
"type": "Text",
"config": {
"label": "Title*",
"placeholder": ""
}
},
"category": {
"type": "Link",
"config": {
"label": "Category*",
"select": "document",
"customtypes": [
"category"
]
}
}
},
"items": {},
"imageUrl": "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format"
}
]
}
And lastly the model of the category:
{
"id": "category",
"label": "Category",
"repeatable": true,
"status": true,
"json": {
"Main": {
"title": {
"type": "Text",
"config": {
"label": "Title",
"placeholder": ""
}
},
"image": {
"type": "Image",
"config": {
"label": "Image",
"constraint": {},
"thumbnails": []
}
},
"uid": {
"type": "UID",
"config": {
"label": "slug",
"placeholder": ""
}
},
"description": {
"type": "StructuredText",
"config": {
"label": "Description",
"placeholder": "",
"allowTargetBlank": true,
"single": "paragraph,preformatted,heading1,heading2,heading3,heading4,heading5,heading6,strong,em,hyperlink,image,embed,list-item,o-list-item,rtl"
}
},
"parent": {
"type": "Link",
"config": {
"label": "Parent Category",
"select": "document",
"customtypes": [
"category"
]
}
}
}
}
}
I don't understand, because when I fetch the homepage using the method client.getAllByType with the following values:
const fetchLinks = [
'article.title',
'article.description',
'category.title',
'category.image',
]
... well it doesn't fetch the category Image. In the data object, I only have the title. Any idea why?
Thanks!