We use s-shopifyql-metric-card in an embedded app. The app has read_reports, protected customer data, and Direct API access. When the logged-in staff member does not have access to ShopifyQL, the card renders Shopify’s own “Couldn’t load data” state.
We want to show our own empty state in that case. I can’t find a documented property, event, or error callback on the analytics web components that says the current user is not allowed to run ShopifyQL.
Is there a supported signal for that?
If there isn’t, is it supported to detect it ourselves by running a small shopifyqlQuery from the embedded app through App Bridge, and treating an access error on that query as “this user can’t use ShopifyQL”? We have not tried that yet. I want to know if it is a supported approach before we rely on it.
Best,
Pius