Open thangpqgm opened 2 weeks ago
You can get it from session:
const shopDomain = session.shop;
Edit: I did not read well, the "id" is not possible to get without query, there are other disscusions about the topic
Hi @thangpqgm, thank you for opening this issue. I'm going to put it in front of the team for discussion.
Currently, I can get the shop domain in the session but I can't get the shop id.
I have to do a query into the session table to get the shop id, which is really annoying,
Getting the shop ID by calling rest API or graph ql also has the same cost.
I thought about saving the shop ID in a cookie but it seems impossible because the admin app is wrapped in an iframe tag,
So is there a simpler way for me to get the shop id in the loader?