App reviews, troubleshooting, and recommendations
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've met a weird issue today when I was tackling the data of webhook, which you could see below:
In this function I called the Graphql to deal with order newly created, I know this is a little bit verbose, but I can't see any useful information about 'fulfillmentOrders' in body paraphrased as 'payload' in my code, reckoning I need to implement the auto-fulfill function; At this function 'fulfillOrder' as pasted below:
and the function 'conditionsGen' is actually simple implement as a name query, pasted below:
the question is when I debug this I could get whole data I concerned through way I pasted below
but when I just let it run, things will get terribly wrong as the orders I received will become empty.
I just wonder wether the order data persistence action of 'order/created ' is actually lagging behind the the web hook action, in other words, when shopify shop is created an order, it will send the web hook firstly and then store the data to databse, and so I cannot query anything about this order?
I am thinking about the solution, actually now I want to setTimeOut() to fix this, but it's too graceless for a programmer.
'