List product api graphql

API Shopify có thể trả về trạng thái hoạt động và liên kết trở lại bản xem trước của sản phẩm có trạng thái là draff không?
Tôi không hiểu tại sao ứng dụng của mình lại nhận được phản hồi bên dưới

node: {id: "gid://shopify/Product/*******", legacyResourceId: "*****",…}

altText: null
height: 1080
id: "gid://shopify/ProductImage/******"
originalSrc: "https://cdn.shopify.com/s/files/1/0752/1081/7842/products/******.jpg?v=1689146625"
src: "https://cdn.shopify.com/s/files/1/0752/1081/7842/products/******.jpg?v=1689146625"
width: 810
createdAt: "2023-07-12T07:23:45Z"
featuredImage: {altText: null, height: 1080, id: "gid://shopify/ProductImage/*******", width: 810,…}
giftCardTemplateSuffix: null
id: "gid://shopify/Product/******"
isGiftCard: false
legacyResourceId: "********"
onlineStorePreviewUrl: "https://*****-75210817842.shopifypreview.com/products_preview?preview_key=c4194a7c1c6e991b6ed2013c1f08ac06"
priceRangeV2: {maxVariantPrice: {amount: "5000.0", currencyCode: "INR"},…}
productType: "*****"
status: "ACTIVE"
tags: ["pfs:hidden:recommendation", "*******"]

Hi Davidto

The Shopify API can return a product’s status through the “status” attribute. In the example you gave, the product is in “ACTIVE” state.

For a link back to the product preview, you can use the “onlineStorePreviewUrl” attribute. This URL will lead to the product’s preview page on your online store.

However, with products in “draft” status, you need to check to see if the API returns this information. The Shopify API does not support direct access to products in draft state.

In case you want to preview draft products on your storefront, you may need to use another method such as creating a separate page for draft products or using a third-party app.

Hope this helps!