Is there a way to get the current apps handle using app bridge or similar (i.e. without resorting to an api request)? Currently bundling it via an env var, but doesn’t seem optimal.
Similar to how shopify.app.extensions() surfaces handles.
Is there a way to get the current apps handle using app bridge or similar (i.e. without resorting to an api request)? Currently bundling it via an env var, but doesn’t seem optimal.
Similar to how shopify.app.extensions() surfaces handles.
Could you tell us more about the use case?
Are you creating Shopify apps dynamically?
Just trying to understand why an ENV var isn’t an option, nor using the Admin API to retrieve the installation details.
@Dylan use-case is multiple tenants, environments & apps, e.g surfacing `shopify://admin/charges/${APP_HANDLE}/pricing_plans` in a nav-menu . The non env approach requires querying `currentAppInstallation { app { handle } }`, which creates a waterfall, I’d prefer to avoid.
Ah yes, that would explain why that’s complex.
Sounds like a niche ask. It might be worth the time to invest in generating some kind of meta mapping of these app handles/IDs to dynamically set up these calls.
@Dylan thanks for the reply, thats not a bad idea, could consolidate all the client constants, and then SSR inject them.