I have a Shopify application that is installed on multiple Shopify stores, and I need to programmatically check which stores have an active subscription plan using the Shopify API and GraphQL.
I want to perform the following tasks:
- Retrieve a list of all the Shopify stores that have installed my application.
- For each store in the list, check if they have an active subscription plan, and if so, retrieve details about the subscription plan.
I understand that Shopify provides GraphQL APIs to interact with store data, but I'm not sure which specific queries and endpoints to use for this purpose.
Can someone please provide guidance or sample code on how to achieve this using Shopify's GraphQL and API?