in my Node project I am fetching articles from shopify app.
Code:
await shopify.article.list(blockId, { limit: 2 });
Now here I am getting both published/unpublished articles. I only want to fetch published articles.
Can you suggest me, which params I need to pass to fetch only published articles?
Thanks in advance.
2
Answers
Doing this solved my issue:
github: https://github.com/MONEI/Shopify-api-node/issues/537
shopify: https://shopify.dev/api/admin-rest/2022-04/resources/article#get-blogs-blog-id-articles
Did you know you can filter by asking for only published articles? It is an amazing thing.
So that ensures your GET articles just returns published articles. Amazing!