Hello! I am working on an app theme extension in shopify and I have a use case where if I click a button within my app extension then it will create a discount code for the customer for a product in that shopify shop.
However I am running into an issue getting access to the current shopify shop context to leverage the .graphql() method to create the discount code using the discountCodeBasicCreate mutation. I am using "const shopify = connections.shopify.current;" and this returns null when I use my global action in the app theme extension. Is there a work around for this or another way I can go about creating a discount code in the shop through the app theme extension ?