Fetching AppSubscriptions

Solved

Fetching AppSubscriptions

nikola_seo
Shopify Partner
15 1 3

I am trying to implement app subscription for my app and when while researching the topic I've found out that the order of updates can sometimes be a problem, eg out of order, or even missing some updates due to network issues. So it seems that the best approach is to use the API to get the most recent version of the `AppSubscription` but I cannot find any way to get the subscription inside the `REST` nor preferably the `GRAPHQL` API docs.

I want to get this `AppSubscription` object via the graphql using the global ID I get from `appSubscriptionCreate` mutation

ref 

Accepted Solution (1)

nikola_seo
Shopify Partner
15 1 3

This is an accepted solution.

Solution

https://community.shopify.com/c/webhooks-and-events/app-subscription-update-webhook/m-p/2252296/high...

          query {
            node(id: "gid://shopify/AppSubscription/<subsciption_id>") {
              ...on AppSubscription {
                createdAt
                currentPeriodEnd
                id
                name
                status
                test
              }
            }
          }

View solution in original post

Reply 1 (1)

nikola_seo
Shopify Partner
15 1 3

This is an accepted solution.

Solution

https://community.shopify.com/c/webhooks-and-events/app-subscription-update-webhook/m-p/2252296/high...

          query {
            node(id: "gid://shopify/AppSubscription/<subsciption_id>") {
              ...on AppSubscription {
                createdAt
                currentPeriodEnd
                id
                name
                status
                test
              }
            }
          }