A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I am now adding multiple variants to an order. Each variant is entitled to a discount. For adding 4 variants, there are the API calls below:
There are 10 in total just for 4 variants. My order edit function is run when the order paid webhook is triggered. It is often running longer than 5s and it causes a timeout. Sometimes, it's running too long. It may block my threads.
Is there any way I can speed up the operation, e.g. adding multiple variants or multiple discounts? Or I can only use a task queue to separate it from the thread?