Use route
query for dynamic routing
#1785
Replies: 1 comment 1 reply
-
Hi @haelbichalex! We have't implemented CMS pages as there isn't really any formatting for CMS pages, no hierarchy etc. How would you envision cms pages to be implemented? Are you relying on pagebuilder? Have you seen this? https://github.com/graphcommerce-org/graphcommerce/blob/canary/docs/magento/seo-migration.md or https://www.graphcommerce.org/docs/magento/seo-migration (the formatting is a bit wonky here though). We've recently improved on the product routes and there now is only a single Add the following to your .env: Technically: Running the route query on each page load and then dynamically forwarding to the correct route is a performance issue which adds up to 300ms load time for each pageload. We found this to be unacceptable and therefor opted for another solution. |
Beta Was this translation helpful? Give feedback.
-
Just started fiddling around with GraphCommerce and noticed there are specific routes for products and categories, with categories being the default if there's no subdirectory given.
Also I haven't seen a out-of-the-box way to display cms pages coming from Magento right now.
Thinking about using GraphCommerce for a customer, this will be one of the first things we would have to adjust, as most customers in my experience want to use the given url structure of Magento.
I've noticed pwa-studio uses the
route
query, which is documented here: https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/route/An idea would then to use this query to fetch the type of entity the url is assigned to and display the corresponding component. Any thoughts? 🙂
Beta Was this translation helpful? Give feedback.
All reactions