Queue Storefront API For checking out

rpezhy
New Member
1 0 0

I recently ran into a problem where I was trying to implement the queue functionality for high-traffic sales in a mobile app using the storefront API. It seems like it was recently added with the 2021-07 version, and using the schema provided by shopify for the storefront API I have found how to submit it and how to retrieve it, but there is no documentation available on how to poll it.

From my understanding if a queue is active the storefront api will return a throttled_during_checkout error, from which you can retrieve the token. But my question is do I just keep submitting this token again and again (Thus "polling" it, though that does not seem right) till it bypasses the queue? Or is there a different mutation I should be using? I know how to submit it, but I just do not know how to poll the checkout.

Any help is appriciated.

Reply 1 (1)
L_J_K
Shopify Staff
Shopify Staff
400 64 81

Hey @rpezhy 

Thanks for raising this regarding the queueToken - I can clarify a few things here regarding it's use.

The use of the polling mechanism is gated on shop level and isn't available to be called for all stores. I acknowledge that when Version 2021-07 was released, this point wasn't mentioned in the docs which would be misleading. We're getting a doc change pushed into the documentation as I write.

To mitigate the throttling on Checkout (and negate the need for a queueToken) we do have the Cart Storefront API. It's newly released - albeit on the unstable version - but will be becoming stable early next year. I'd recommend to stay abreast for any further announcements concerning it's transition to the stable API via the Developer changelog.

Hope this helps - please  let me know if you have any further questions!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!