-
Notifications
You must be signed in to change notification settings - Fork 155
Expose catalog configuration data as a new info query type. #535
Comments
@VitaliyBoyko As we implement features in Venia, we try to use store configuration instead of hardcoding things, so that Magento admins can control their PWA display as much as possible. Therefore, we may eventually use everything inside the If you can make a single change that exposes all of those values, we would like that. None of them are sensitive; they all drive frontend behavior. Could we just put all of them into the Maybe that's hard to do, or it's a bad idea to expose all these values at once. In that case, we'll ask for config values to be exposed one by one. For the use case I described in this ticket, we would need |
Hi @zetlen I will add product_url_suffix and category_url_sufffix as soon as I can. Thank you! |
OK, thank you! For additional admin configurability, may I please request that you add all of the elements that are currently present in the |
Description (*)
Exposure of catalog configuration data as a
catalogInfo
query type.Expected behavior (*)
The data whose defaults are set in Magento_Catalog/etc/config.xml and whose overrides can be set in the database should be available for query, in order to configure, build, and deploy Progressive Web Apps which honor that configuration.
Benefits
Unlike most other PWAs, PWA Studio and Venia aim to be as controllable by the Magento 2 admin UI as possible. If the administrator sets a new default for any of these fields, a PWA should do its best to honor that. Most of the time, that requires making a large query to the store instance while rendering the PWA, so things like pagination defaults and URL suffixes can be built into the runtime.
Additional information
This issue came up when the PWA team examined how to treat URL suffixes for SEO-friendly catalog URLs. Initially, we simply hardcoded the standard
.html
extension to check for pages which we need to dynamically route with a GraphQL query tourlResolver
. There are two problems with that:.html
extensionTherefore, we need to be able to access this through some API. If the information is privileged, then we can begin using authentication over GraphQL if necessary and doing the call on the server side alone.
Relevant issues:
magento/pwa-studio#936
magento/pwa-studio#1029
The text was updated successfully, but these errors were encountered: