-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Hi,
There is inconsistencies in your data response vs strapi rest api data response which is creating an anti-pattern.
When populating on fuzzy search we get back results like this:
[
{
"id": 4,
"name": "YurMart",
"banner": { // populated field
"id": 79,
"url": "https://ik.imagekit.io/cbs/ticketland/dev/crowd.jpg_FCCgK-CSL.png",
"type": "image"
}
}
]But in strapi rest api the root and populated results are nested in "data" and "attributes" properties:
[
{
"id": 4,
"attributes": { // nested in attributes
"name": "YurMart",
"banner": { // rest api populated field
"data": {
"id": 79,
"attributes": {
"url": "https://ik.imagekit.io/cbs/ticketland/dev/crowd.jpg_FCCgK-CSL.png",
"type": "image"
}
}
}
}
}
]I tried to ditch the initial strapi rest api query for fuzzy search just to return some initial data for page load but you cannot use fuzzy search without passing a search query.
What do you recommend?
Metadata
Metadata
Assignees
Labels
No labels