My Shopify store successfully creates collections, and the gadget syncs them immediately. However,

My Shopify store successfully creates collections, and the gadget syncs them immediately. However, when I create a blog post, it doesn't sync to the gadget. What's usually wrong with this?tks
8 Replies
ljspoor94
ljspoor9410mo ago
I’m not sure if there are any webhooks for blos/articles. Have you checked?
Chocci_Milk
Chocci_Milk10mo ago
Some models are sync only. I believe that Blog is one of those models.
Chocci_Milk
Chocci_Milk10mo ago
Shopify
WebhookSubscriptionTopic - GraphQL Admin
The supported topics for webhook subscriptions. You can use webhook subscriptions to receive notifications about particular events in a shop. You create mandatory webhooks either via the [Partner Dashboard](https://shopify.dev/apps/webhooks/confi...
leshu
leshuOP10mo ago
Thank you so much,So I can update manually in gadget👍
leshu
leshuOP10mo ago
i add the code const shopId = connections.shopify.current ? connections.shopify.currentShopId : null; const shopDomain = connections.shopify.current ? connections.shopify.currentShopDomain : null; const syncSince = new Date ( ) ;
syncSince . setDate ( syncSince . getDate ( ) - 1 ) ; await api.shopifySync.run({ shopifySync: { domain: shopDomain, shop: { _link: shopId, }, models: ["shopifyArticle"], syncSince : syncSince . toISOString ( ) , }, }); and i see the log show sync for shop completed successfully, But in fact I found that the data was not synchronized to the gadget
No description
leshu
leshuOP10mo ago
ok ,handled it change like this: const resultsipo = await api.shopifySync.run({ shopifySync: { domain: shopDomain, shop: { _link: shopId, }, models: [ "shopifyArticle", "shopifyBlog", "shopifyCollect", "shopifyComment", "shopifyFile" ], syncSince : syncSince . toISOString ( ) , }, });
Chocci_Milk
Chocci_Milk10mo ago
I recommend that you don't fire off syncs to fill data as a result of another webhook. You should instead fetch from the Shopify API. Syncs will cause your request time to increase quite rapidly
leshu
leshuOP10mo ago
ok,thks

Did you find this page helpful?