Utilizing GlobalSettings for public viewable data? #2431
-
Hello I wanted an option to add shop-specific data to my vendure backend, and I thought custom fields would be the perfect solution. Very little work to get it done... or so I thought. It appears the globalSettings query is only available to the admin api, so I can't query my custom data from the frontend. Is there some way to enable the globalSettings (or atleast the custom fields part of it) query for the shop api without much hassle? Or should I declare my own table and store my public data there. I was hoping for the least amount of work needed :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I ended up making my own "PublicData" query for the shop api, with a custom resolver which injects the GlobalSettingsService, and from there fetching and returning the data. |
Beta Was this translation helpful? Give feedback.
This is exactly how I would have recommended you solve it 👍