Is it possible to query a list of Collection-Types in Strapi?
The following example:
I have three Collection-Types:
- Restaurant
- Stores
- Events
The client application does not know which Collection-Types exist and I want to query them dynamically:
Example response
{
contentTypes: [
{
name: "Restaurant"
},
{
name: "Stores"
},
{
name: "Events"
}
]
}
Is this possible with Strapi? Thanks!
5
1 Answer
Maybe we can create a collection to store all other collection-type names.
New contributor
mozi tong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Did you ever figure out how to do this?
Oct 5, 2022 at 17:52
@AsheAbbottDiBlasi Unfortunately not. 🙁 Have you had any luck?
Jan 10 at 12:20
I didn't have any luck. We ended up building our own solution with React instead of using Strapi.
Jan 10 at 17:31
@AsheAbbottDiBlasi We also had to write our own solution with React & Express.js. LOL. Good luck with your project!
Jan 10 at 19:03
Good luck to you, too!
Jan 11 at 1:00