Strapi v5: A way of fetching all navigations with GraphQL
michsko544 opened this issue · 3 comments
I would like to ask if it is currently possible to fetch all navigations at once using GraphQL?
If not, I would like to request this feature, as it would be very useful in my use case.
Use Case: In my page layout, I need to fetch multiple menus, such as the main navigation menu and the footer menus. Instead of fetching each menu individually, I would prefer to fetch all menus in a single GraphQL query and then utilize them in the appropriate sections by using their slugs.
This would simplify the data-fetching process and improve efficiency.
Thank you for considering this request!
GQL does not support it yet.
Would you like to fetch all with nested items ? Or just flat structure to preprocess on the FE?
It would be great to handle both cases, e.g. via the type parameter. In my case, I use a flat structure for the mobile version and a tree structure for the desktop version
If I had to choose one, I would prefer to receive an API response with nested elements.